summaryrefslogtreecommitdiff
path: root/gdb/m2-exp.y
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/m2-exp.y')
-rw-r--r--gdb/m2-exp.y7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 1e3e3cbcabc..ef9ec8e9eab 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -588,6 +588,13 @@ variable: block COLONCOLON NAME
if (sym == 0)
error (_("No symbol \"%s\" in specified context."),
copy_name ($3));
+ if (symbol_read_needs_frame (sym))
+ {
+ if (innermost_block == 0
+ || contained_in (block_found,
+ innermost_block))
+ innermost_block = block_found;
+ }
write_exp_elt_opcode (OP_VAR_VALUE);
/* block_found is set by lookup_symbol. */