* dwarf2expr.c (execute_stack_op) <DW_OP_GNU_regval_type>: Use
authorTom Tromey <tromey@redhat.com>
Wed, 13 Jul 2011 16:51:22 +0000 (16:51 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 13 Jul 2011 16:51:22 +0000 (16:51 +0000)
value_from_contents for final conversion.

gdb/ChangeLog
gdb/dwarf2expr.c

index 0089c25f5a19a5590c736a1ae7be06dcaeff8d94..4062bf9cefbce1a22c3fecc454f0f0187f84385c 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-13  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2expr.c (execute_stack_op) <DW_OP_GNU_regval_type>: Use
+       value_from_contents for final conversion.
+
 2011-07-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Code cleanup.
index b23ad9ab1a9b86a591fa194ae2fb8fda3d5d414b..21a8363396f351da8672174072cb1ff794906939 100644 (file)
@@ -1221,7 +1221,9 @@ execute_stack_op (struct dwarf_expr_context *ctx,
 
            type = dwarf_get_base_type (ctx, type_die, 0);
            result = (ctx->read_reg) (ctx->baton, reg);
-           result_val = value_from_ulongest (type, result);
+           result_val = value_from_ulongest (address_type, result);
+           result_val = value_from_contents (type,
+                                             value_contents_all (result_val));
          }
          break;