diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 61c566300da..a632de69c37 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2019-03-06 Andrew Burgess + + * f-lang.c (evaluate_subexp_f): New function. + (exp_descriptor_f): New global. + (f_language_defn): Use exp_descriptor_f instead of + exp_descriptor_standard. + 2019-03-06 Andrew Burgess * f-exp.y (struct token): Add comments. diff --git a/gdb/f-lang.c b/gdb/f-lang.c index 6eb9b230eb7..5beb46c5f31 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -239,6 +239,15 @@ f_collect_symbol_completion_matches (completion_tracker &tracker, text, word, ":", code); } +/* Special expression evaluation cases for Fortran. */ +struct value * +evaluate_subexp_f (struct type *expect_type, struct expression *exp, + int *pos, enum noside noside) +{ + /* Currently no special handling is required. */ + return evaluate_subexp_standard (expect_type, exp, pos, noside); +} + static const char *f_extensions[] = { ".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP", @@ -246,6 +255,17 @@ static const char *f_extensions[] = NULL }; +/* Expression processing for Fortran. */ +static const struct exp_descriptor exp_descriptor_f = +{ + print_subexp_standard, + operator_length_standard, + operator_check_standard, + op_name_standard, + dump_subexp_body_standard, + evaluate_subexp_f +}; + extern const struct language_defn f_language_defn = { "fortran", @@ -256,7 +276,7 @@ extern const struct language_defn f_language_defn = array_column_major, macro_expansion_no, f_extensions, - &exp_descriptor_standard, + &exp_descriptor_f, f_parse, /* parser */ null_post_parser, f_printchar, /* Print character constant */