diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2/expr.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/varval.exp | 2 |
4 files changed, 14 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc05eea..e10f89f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-07-28 Tom Tromey <tromey@adacore.com> + + * dwarf2/expr.c (dwarf_expr_context::execute_stack_op) + <DW_OP_GNU_variable_value>: Cast to address type. + 2020-07-28 Kamil Rytarowski <n54@gmx.com> * nbsd-nat.h (nbsd_nat_target::xfer_partial): New declaration. diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index 91ac4c0..9bf7413 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -1270,7 +1270,8 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr, this->ref_addr_size, byte_order); op_ptr += this->ref_addr_size; - result_val = this->dwarf_variable_value (sect_off); + result_val = value_cast (address_type, + this->dwarf_variable_value (sect_off)); } break; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5ae2588..40283fa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-07-28 Tom Tromey <tromey@adacore.com> + + * gdb.dwarf2/varval.exp (setup_exec): Add 'or' instruction to + 'varval' location. + 2020-07-28 Andrew Burgess <andrew.burgess@embecosm.com> * gdb.python/py-unwind.py: Update to make use of a register diff --git a/gdb/testsuite/gdb.dwarf2/varval.exp b/gdb/testsuite/gdb.dwarf2/varval.exp index 69790e7..cb8836e 100644 --- a/gdb/testsuite/gdb.dwarf2/varval.exp +++ b/gdb/testsuite/gdb.dwarf2/varval.exp @@ -207,6 +207,8 @@ proc setup_exec { arg_bad } { {DW_AT_type :${int_label}} {DW_AT_location { DW_OP_GNU_variable_value ${var_a_label} + DW_OP_const1s 0 + DW_OP_or DW_OP_stack_value } SPECIAL_expr} } |