diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-08-18 19:33:39 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1993-08-18 19:33:39 +0000 |
commit | 479fdd26ee1390b558509aec8e5f8a6a4d7074df (patch) | |
tree | 033bf7a1877e86b157805ad11f46f0f9fa6f8d78 /gdb/m2-exp.y | |
parent | e56ac0ba86b473dfa9a227f06d903970345e513d (diff) | |
download | gdb-479fdd26ee1390b558509aec8e5f8a6a4d7074df.zip gdb-479fdd26ee1390b558509aec8e5f8a6a4d7074df.tar.gz gdb-479fdd26ee1390b558509aec8e5f8a6a4d7074df.tar.bz2 |
* blockframe.c (block_innermost_frame): Uncomment.
Return NULL if passed NULL.
* frame.h: Declare it.
* expression.h (union exp_element): Add field block.
* parse.c (write_exp_elt_block): New function.
* expression.h (OP_VAR_VALUE): Now takes additional struct block *.
* *-exp.y: Write block for OP_VAR_VALUE.
* eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE.
* valops.c, value.h (value_of_variable), callers:
Add second argument, for block.
Diffstat (limited to 'gdb/m2-exp.y')
-rw-r--r-- | gdb/m2-exp.y | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 56ed6e6..b00af97 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -559,6 +559,7 @@ fblock : block COLONCOLON BLOCKNAME /* Useful for assigning to PROCEDURE variables */ variable: fblock { write_exp_elt_opcode(OP_VAR_VALUE); + write_exp_elt_block (NULL); write_exp_elt_sym ($1); write_exp_elt_opcode (OP_VAR_VALUE); } ; @@ -580,6 +581,8 @@ variable: block COLONCOLON NAME copy_name ($3)); write_exp_elt_opcode (OP_VAR_VALUE); + /* block_found is set by lookup_symbol. */ + write_exp_elt_block (block_found); write_exp_elt_sym (sym); write_exp_elt_opcode (OP_VAR_VALUE); } ; @@ -623,6 +626,10 @@ variable: NAME break; } write_exp_elt_opcode (OP_VAR_VALUE); + /* We want to use the selected frame, not + another more inner frame which happens to + be in the same block. */ + write_exp_elt_block (NULL); write_exp_elt_sym (sym); write_exp_elt_opcode (OP_VAR_VALUE); } |