summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-01-17 23:09:29 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-01-17 23:09:29 +0000
commitc54769341555e3eb3ed7630eae714da4d4eeddc2 (patch)
tree398b8cec46c313da29a1e5a685395c4c25f22b96
parent00875b1b2138b85414ac8dd1fc2d76dcdc1d30fb (diff)
downloadgdb-c54769341555e3eb3ed7630eae714da4d4eeddc2.tar.gz
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.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/dwarf2expr.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fb99958f7d6..66166b072a3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-17 Daniel Jacobowitz <drow@mvista.com>
+
+ 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 <cagney@redhat.com>
* x86-64-tdep.c (x86_64_init_abi): No need to clear
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index cf00929e225..50baced5f2e 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. */