* dwarf2expr.c (execute_stack_op) <DW_OP_GNU_convert>: Treat type
authorTom Tromey <tromey@redhat.com>
Wed, 22 Jun 2011 13:38:21 +0000 (13:38 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 22 Jun 2011 13:38:21 +0000 (13:38 +0000)
argument of 0 specially.

gdb/ChangeLog
gdb/dwarf2expr.c

index b11442854f437ecd1736fa4caa29d5126c604258..1c5ef959a03163fb23e8300944f8d0f475031d33 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-22  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_convert>: Treat type
+       argument of 0 specially.
+
 2011-06-22  Yao Qi  <yao@codesourcery.com>
 
        * infrun.c (handle_inferior_event): Remove write-only local variable
index 23389b8b31db79225b11f12cea22efd4d9e32a37..c5ea85da802548d2f96cbecbf830bbfa8ab2cba0 100644 (file)
@@ -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);