aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-16 21:32:05 +0000
committerTom Tromey <tromey@redhat.com>2011-02-16 21:32:05 +0000
commitb1bfef653388230e8c7cf1a668c2cf2461c22fc1 (patch)
treeeeff906238acb7c2bb8611b13bc9f6db5ac6219b /gdb/dwarf2read.c
parent5f1e6f19499e47ced2f00e78919636e4f5279ae8 (diff)
downloadgdb-b1bfef653388230e8c7cf1a668c2cf2461c22fc1.zip
gdb-b1bfef653388230e8c7cf1a668c2cf2461c22fc1.tar.gz
gdb-b1bfef653388230e8c7cf1a668c2cf2461c22fc1.tar.bz2
* dwarf2loc.c (unimplemented): Handle unnamed opcodes.
(compile_dwarf_to_ax) <default>: Use unimplemented. <DW_OP_deref>: Update. (disassemble_dwarf_expression): Update. * dwarf2read.c (dwarf_stack_op_name): Remove 'def' argument. (decode_locdesc): Update. * dwarf2expr.h (dwarf_stack_op_name): Update.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 837fa3b..08b804a 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -12497,7 +12497,7 @@ dwarf_form_name (unsigned form)
/* Convert a DWARF stack opcode into its string name. */
const char *
-dwarf_stack_op_name (unsigned op, int def)
+dwarf_stack_op_name (unsigned op)
{
switch (op)
{
@@ -12819,7 +12819,7 @@ dwarf_stack_op_name (unsigned op, int def)
case DW_OP_GNU_implicit_pointer:
return "DW_OP_GNU_implicit_pointer";
default:
- return def ? "OP_<unknown>" : NULL;
+ return NULL;
}
}
@@ -13743,8 +13743,17 @@ decode_locdesc (struct dwarf_block *blk, struct dwarf2_cu *cu)
break;
default:
- complaint (&symfile_complaints, _("unsupported stack op: '%s'"),
- dwarf_stack_op_name (op, 1));
+ {
+ const char *name = dwarf_stack_op_name (op);
+
+ if (name)
+ complaint (&symfile_complaints, _("unsupported stack op: '%s'"),
+ name);
+ else
+ complaint (&symfile_complaints, _("unsupported stack op: '%02x'"),
+ op);
+ }
+
return (stack[stacki]);
}