Fix two Fortran regressions
authorTom Tromey <tromey@adacore.com>
Thu, 11 Feb 2021 15:27:46 +0000 (08:27 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 11 Feb 2021 15:32:50 +0000 (08:32 -0700)
Luis pointed out that an earlier patch of mine caused two regressions
in gdb.fortran.  This patch fixes the problem.

Regression tested on x86-64 Fedora 32.

gdb/ChangeLog
2021-02-11  Tom Tromey  <tromey@adacore.com>

PR gdb/27383:
* parse.c (write_exp_symbol_reference): Write sym.block.

gdb/ChangeLog
gdb/parse.c

index 10f391e5ea531437890faba2d6fd9d4f322ba10c..4d0033de625e17ce009522f399afc0a7fc6a06e6 100644 (file)
@@ -1,3 +1,8 @@
+2021-02-11  Tom Tromey  <tromey@adacore.com>
+
+       PR gdb/27383:
+       * parse.c (write_exp_symbol_reference): Write sym.block.
+
 2021-02-11  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * NEWS: Mention changes to 'maint info sections'.
index d634a4f736c2ef44c477b0560d2f9c3d83096ce1..884a00862ece650d99cb28f8e0eb6bd81c51ec0d 100644 (file)
@@ -661,7 +661,7 @@ write_exp_symbol_reference (struct parser_state *pstate, const char *name,
       if (symbol_read_needs_frame (sym.symbol))
        pstate->block_tracker->update (sym);
       write_exp_elt_opcode (pstate, OP_VAR_VALUE);
-      write_exp_elt_block (pstate, NULL);
+      write_exp_elt_block (pstate, sym.block);
       write_exp_elt_sym (pstate, sym.symbol);
       write_exp_elt_opcode (pstate, OP_VAR_VALUE);
     }