From 9c23835799161e27e2223564295f53c0a97d5689 Mon Sep 17 00:00:00 2001 From: Randolph Chung Date: Sat, 19 Nov 2005 13:43:35 +0000 Subject: 2005-11-19 Randolph Chung * dwarf2loc.c (dwarf2_tracepoint_var_ref): Remove extra add for DW_OP_fbreg. Handle DW_OP_breg0 through DW_OP_breg31. Print DWARF opcode for unsupported case. --- gdb/ChangeLog | 6 ++++++ gdb/dwarf2loc.c | 23 ++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) (limited to 'gdb') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 71f9e94..362dd42 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2005-11-19 Randolph Chung + * dwarf2loc.c (dwarf2_tracepoint_var_ref): Remove extra add for + DW_OP_fbreg. Handle DW_OP_breg0 through DW_OP_breg31. Print + DWARF opcode for unsupported case. + +2005-11-19 Randolph Chung + * hppa-hpux-tdep.c (hppa_hpux_sigtramp_frame_unwind_cache): Use HPPA_HPUX_SS_* constants. Ensure "off" is large enough to hold 64-bit offset. Set proper signal context offset for 64-bit diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 8a3e99f..1005fa7 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -477,13 +477,30 @@ dwarf2_tracepoint_var_ref (struct symbol *symbol, struct agent_expr *ax, ax_const_l (ax, frame_offset); ax_simple (ax, aop_add); - ax_const_l (ax, frame_offset); + value->kind = axs_lvalue_memory; + } + else if (data[0] >= DW_OP_breg0 + && data[0] <= DW_OP_breg31) + { + unsigned int reg; + LONGEST offset; + gdb_byte *buf_end; + + reg = data[0] - DW_OP_breg0; + buf_end = read_sleb128 (data + 1, data + size, &offset); + if (buf_end != data + size) + error (_("Unexpected opcode after DW_OP_breg%u for symbol \"%s\"."), + reg, SYMBOL_PRINT_NAME (symbol)); + + ax_reg (ax, reg); + ax_const_l (ax, offset); ax_simple (ax, aop_add); + value->kind = axs_lvalue_memory; } else - error (_("Unsupported DWARF opcode in the location of \"%s\"."), - SYMBOL_PRINT_NAME (symbol)); + error (_("Unsupported DWARF opcode 0x%x in the location of \"%s\"."), + data[0], SYMBOL_PRINT_NAME (symbol)); } /* Return the value of SYMBOL in FRAME using the DWARF-2 expression -- cgit v1.1