aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2expr.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-06-22 13:38:21 +0000
committerTom Tromey <tromey@redhat.com>2011-06-22 13:38:21 +0000
commitc38c4bc5b298545effe1f4afb31d53d66153f189 (patch)
tree2139b0ea529b088087b778ecee5427e7def7c3a5 /gdb/dwarf2expr.c
parentb138ce370d0b62f15547b24c5aac4a8a02af07d9 (diff)
downloadgdb-c38c4bc5b298545effe1f4afb31d53d66153f189.zip
gdb-c38c4bc5b298545effe1f4afb31d53d66153f189.tar.gz
gdb-c38c4bc5b298545effe1f4afb31d53d66153f189.tar.bz2
* dwarf2expr.c (execute_stack_op) <DW_OP_GNU_convert>: Treat type
argument of 0 specially.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r--gdb/dwarf2expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 23389b8..c5ea85d 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -1229,7 +1229,10 @@ execute_stack_op (struct dwarf_expr_context *ctx,
op_ptr = read_uleb128 (op_ptr, op_end, &type_die);
- type = dwarf_get_base_type (ctx, type_die, 0);
+ if (type_die == 0)
+ type = address_type;
+ else
+ type = dwarf_get_base_type (ctx, type_die, 0);
result_val = dwarf_expr_fetch (ctx, 0);
dwarf_expr_pop (ctx);