aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.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/dwarf2loc.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/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 0f58954..f90335d 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1334,8 +1334,14 @@ dwarf2_loc_desc_needs_frame (const gdb_byte *data, unsigned short size,
static void
unimplemented (unsigned int op)
{
- error (_("DWARF operator %s cannot be translated to an agent expression"),
- dwarf_stack_op_name (op, 1));
+ const char *name = dwarf_stack_op_name (op);
+
+ if (name)
+ error (_("DWARF operator %s cannot be translated to an agent expression"),
+ name);
+ else
+ error (_("Unknown DWARF operator 0x%02x cannot be to an agent expression"),
+ op);
}
/* A helper function to convert a DWARF register to an arch register.
@@ -1793,8 +1799,10 @@ compile_dwarf_to_ax (struct agent_expr *expr, struct axs_value *loc,
ax_simple (expr, aop_ref64);
break;
default:
+ /* Note that dwarf_stack_op_name will never return
+ NULL here. */
error (_("Unsupported size %d in %s"),
- size, dwarf_stack_op_name (op, 1));
+ size, dwarf_stack_op_name (op));
}
}
break;
@@ -2070,7 +2078,7 @@ compile_dwarf_to_ax (struct agent_expr *expr, struct axs_value *loc,
unimplemented (op);
default:
- error (_("Unhandled dwarf expression opcode 0x%x"), op);
+ unimplemented (op);
}
}
@@ -2295,7 +2303,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
LONGEST l;
const char *name;
- name = dwarf_stack_op_name (op, 0);
+ name = dwarf_stack_op_name (op);
if (!name)
error (_("Unrecognized DWARF opcode 0x%02x at %ld"),