2005-11-13 Randolph Chung * dwarf2loc.c (dwarf2_tracepoint_var_ref): Handle DW_OP_breg0 through DW_OP_breg31. Print DWARF opcode for unsupported case. Index: dwarf2loc.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2loc.c,v retrieving revision 1.30 diff -u -p -r1.30 dwarf2loc.c --- dwarf2loc.c 4 Nov 2005 02:42:34 -0000 1.30 +++ dwarf2loc.c 13 Nov 2005 15:29:18 -0000 @@ -479,9 +479,30 @@ dwarf2_tracepoint_var_ref (struct symbol ax_simple (ax, aop_add); 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); + + 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