From 30e191c6b34f975503318dab93cf22f52388d7f6 Mon Sep 17 00:00:00 2001 From: drow Date: Sat, 17 Jan 2004 23:09:28 +0000 Subject: [PATCH] Suggested by George Anzinger. * dwarf2expr.c (execute_stack_op): Fetch the second item from the correct stack offset. Include unknown opcode numbers in the error message. --- gdb/ChangeLog | 7 +++++++ gdb/dwarf2expr.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fb99958f7d..66166b072a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2004-01-17 Daniel Jacobowitz + + Suggested by George Anzinger. + * dwarf2expr.c (execute_stack_op): Fetch the second item from the + correct stack offset. Include unknown opcode numbers in the error + message. + 2004-01-17 Andrew Cagney * x86-64-tdep.c (x86_64_init_abi): No need to clear diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index cf00929e22..50baced5f2 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -562,7 +562,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, second = dwarf_expr_fetch (ctx, 0); dwarf_expr_pop (ctx); - first = dwarf_expr_fetch (ctx, 1); + first = dwarf_expr_fetch (ctx, 0); dwarf_expr_pop (ctx); val1 = value_from_longest (unsigned_address_type (), first); @@ -660,7 +660,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr, goto no_push; default: - error ("Unhandled dwarf expression opcode"); + error ("Unhandled dwarf expression opcode 0x%x", op); } /* Most things push a result value. */ -- 2.11.0