aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2-frame.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-09-11 18:38:39 +0000
committerTom Tromey <tromey@redhat.com>2009-09-11 18:38:39 +0000
commitcec03d703f8c80f4a3f98fe0e3e35dde7e9b1835 (patch)
tree2faf4cf446d7c4f9eedfb9f15c4cfe890722b62d /gdb/dwarf2-frame.c
parenta05e8785c75bf89c90799f675f126782aabbb20e (diff)
downloadgdb-cec03d703f8c80f4a3f98fe0e3e35dde7e9b1835.zip
gdb-cec03d703f8c80f4a3f98fe0e3e35dde7e9b1835.tar.gz
gdb-cec03d703f8c80f4a3f98fe0e3e35dde7e9b1835.tar.bz2
gdb
* dwarf2loc.c (struct piece_closure) <arch>: New field. (dwarf2_evaluate_loc_desc): Update. (dwarf2_loc_desc_needs_frame): Likewise. (allocate_piece_closure): Initialize new field. (read_pieced_value): Update. (write_pieced_value): Update. (copy_pieced_value_closure): Update. * dwarf2expr.h (enum dwarf_value_location): New. (struct dwarf_expr_context) <in_reg>: Remove. <location, len, data>: New fields. (struct dwarf_expr_piece) <in_reg, value>: Remove. <location, v>: New fields. * dwarf2expr.c (add_piece): Remove in_reg, value arguments. Update. (require_composition): New function. (execute_stack_op): Update. <DW_OP_implicit_value, DW_OP_stack_value>: New cases. <DW_OP_reg0>: Set location, not in_reg. <DW_OP_regx>: Likewise. Use require_composition. <DW_OP_fbreg>: Update. <DW_OP_piece>: Likewise. * dwarf2-frame.c (execute_stack_op): Update. gdb/testsuite * gdb.dwarf2/valop.S: New file. * gdb.dwarf2/valop.exp: New file.
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r--gdb/dwarf2-frame.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index f9ca067..a923edf 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -379,8 +379,15 @@ execute_stack_op (gdb_byte *exp, ULONGEST len, int addr_size,
dwarf_expr_eval (ctx, exp, len);
result = dwarf_expr_fetch (ctx, 0);
- if (ctx->in_reg)
+ if (ctx->location == DWARF_VALUE_REGISTER)
result = read_reg (this_frame, result);
+ else if (ctx->location != DWARF_VALUE_MEMORY)
+ {
+ /* This is actually invalid DWARF, but if we ever do run across
+ it somehow, we might as well support it. So, instead, report
+ it as unimplemented. */
+ error (_("Not implemented: computing unwound register using explicit value operator"));
+ }
do_cleanups (old_chain);