FYI: fix problem with DW_OP_GNU_regval_type
Tom Tromey
tromey@redhat.com
Wed Jul 13 17:13:00 GMT 2011
I'm checking this in on the trunk.
DW_OP_GNU_regval_type is obviously broken if the requested type is a
floating point type -- because value_from_ulongest cannot handle that.
This patch fixes the code to use value_from_contents instead.
Built and regtested by the buildbot.
Tom
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.
Index: dwarf2expr.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2expr.c,v
retrieving revision 1.68
diff -u -r1.68 dwarf2expr.c
--- dwarf2expr.c 11 Jul 2011 13:40:23 -0000 1.68
+++ dwarf2expr.c 13 Jul 2011 16:25:01 -0000
@@ -1221,7 +1221,9 @@
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;
More information about the Gdb-patches
mailing list