gdb/fortran: Move Fortran expression handling into f-lang.c
The Fortran specific OP_F77_UNDETERMINED_ARGLIST is currently handled in the generic expression handling code. There's no reason why this should be the case, so this commit moves handling of this into Fortran specific files. There should be no user visible changes after this commit. gdb/ChangeLog: * eval.c: Remove 'f-lang.h' include. (value_f90_subarray): Moved to f-lang.c. (eval_call): Renamed to... (evaluate_subexp_do_call): ...this, is no longer static, header comment moved into header file. (evaluate_funcall): Update call to eval_call. (skip_undetermined_arglist): Moved to f-lang.c. (fortran_value_subarray): Likewise. (evaluate_subexp_standard): OP_F77_UNDETERMINED_ARGLIST handling moved to evaluate_subexp_f. (calc_f77_array_dims): Moved to f-lang.c * expprint.c (print_subexp_funcall): New function. (print_subexp_standard): OP_F77_UNDETERMINED_ARGLIST handling moved to print_subexp_f, OP_FUNCALL uses new function. (dump_subexp_body_funcall): New function. (dump_subexp_body_standard): OP_F77_UNDETERMINED_ARGLIST handling moved to dump_subexp_f, OP_FUNCALL uses new function. * expression.h (evaluate_subexp_do_call): Declare. * f-lang.c (value_f90_subarray): Moved from eval.c. (skip_undetermined_arglist): Likewise. (calc_f77_array_dims): Likewise. (fortran_value_subarray): Likewise. (evaluate_subexp_f): Add OP_F77_UNDETERMINED_ARGLIST support. (operator_length_f): Likewise. (print_subexp_f): Likewise. (dump_subexp_body_f): Likewise. * fortran-operator.def (OP_F77_UNDETERMINED_ARGLIST): Move declaration of this operation to here. * parse.c (operator_length_standard): OP_F77_UNDETERMINED_ARGLIST support moved to operator_length_f. * parser-defs.h (dump_subexp_body_funcall): Declare. (print_subexp_funcall): Declare. * std-operator.def (OP_F77_UNDETERMINED_ARGLIST): Moved to fortran-operator.def.
This commit is contained in:
parent
8c37706a51
commit
6d81691950
9 changed files with 339 additions and 248 deletions
|
@ -338,6 +338,13 @@ extern int dump_subexp (struct expression *, struct ui_file *, int);
|
|||
extern int dump_subexp_body_standard (struct expression *,
|
||||
struct ui_file *, int);
|
||||
|
||||
/* Dump (to STREAM) a function call like expression at position ELT in the
|
||||
expression array EXP. Return a new value for ELT just after the
|
||||
function call expression. */
|
||||
|
||||
extern int dump_subexp_body_funcall (struct expression *exp,
|
||||
struct ui_file *stream, int elt);
|
||||
|
||||
extern void operator_length (const struct expression *, int, int *, int *);
|
||||
|
||||
extern void operator_length_standard (const struct expression *, int, int *,
|
||||
|
@ -440,6 +447,15 @@ extern void print_subexp (struct expression *, int *, struct ui_file *,
|
|||
extern void print_subexp_standard (struct expression *, int *,
|
||||
struct ui_file *, enum precedence);
|
||||
|
||||
/* Print a function call like expression to STREAM. This is called as a
|
||||
helper function by which point the expression node identifying this as a
|
||||
function call has already been stripped off and POS should point to the
|
||||
number of function call arguments. EXP is the object containing the
|
||||
list of expression elements. */
|
||||
|
||||
extern void print_subexp_funcall (struct expression *exp, int *pos,
|
||||
struct ui_file *stream);
|
||||
|
||||
/* Function used to avoid direct calls to fprintf
|
||||
in the code generated by the bison parser. */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue