* [PATCH] Add DW_OP_GNU_parameter_ref support and DW_OP_GNU_{convert,reinterpret} <0> support
@ 2011-06-22 15:09 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2011-06-22 15:09 UTC (permalink / raw)
To: binutils
Hi!
I have committed today a patch to add DW_OP_GNU_parameter_ref
support to GCC and also to allow 0 as special offset for
DW_OP_GNU_{convert,reinterpret} (to mean convert/reinterpret to untyped).
This patch is the corresponding binutils change, committed to binutils
trunk.
2011-06-22 Jakub Jelinek <jakub@redhat.com>
* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
* dwarf.c (decode_location_expression): For DW_OP_GNU_convert and
DW_OP_GNU_reinterpret, if uvalue is 0, don't add cu_offset.
Handle DW_OP_GNU_parameter_ref.
--- include/dwarf2.h.jj 2011-04-30 13:00:14.000000000 +0200
+++ include/dwarf2.h 2011-06-22 09:59:59.000000000 +0200
@@ -563,6 +563,8 @@ enum dwarf_location_atom
DW_OP_GNU_deref_type = 0xf6,
DW_OP_GNU_convert = 0xf7,
DW_OP_GNU_reinterpret = 0xf9,
+ /* The GNU parameter ref extension. */
+ DW_OP_GNU_parameter_ref = 0xfa,
/* HP extensions. */
DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */
DW_OP_HP_is_value = 0xe1,
--- binutils/dwarf.c.jj 2011-06-08 12:51:59.000000000 +0200
+++ binutils/dwarf.c 2011-06-22 10:00:38.000000000 +0200
@@ -1179,13 +1179,18 @@ decode_location_expression (unsigned cha
uvalue = read_leb128 (data, &bytes_read, 0);
data += bytes_read;
printf ("DW_OP_GNU_convert <0x%s>",
- dwarf_vmatoa ("x", cu_offset + uvalue));
+ dwarf_vmatoa ("x", uvalue ? cu_offset + uvalue : 0));
break;
case DW_OP_GNU_reinterpret:
uvalue = read_leb128 (data, &bytes_read, 0);
data += bytes_read;
printf ("DW_OP_GNU_reinterpret <0x%s>",
- dwarf_vmatoa ("x", cu_offset + uvalue));
+ dwarf_vmatoa ("x", uvalue ? cu_offset + uvalue : 0));
+ break;
+ case DW_OP_GNU_parameter_ref:
+ printf ("DW_OP_GNU_parameter_ref: <0x%s>",
+ dwarf_vmatoa ("x", cu_offset + byte_get (data, 4)));
+ data += 4;
break;
/* HP extensions. */
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-22 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-22 15:09 [PATCH] Add DW_OP_GNU_parameter_ref support and DW_OP_GNU_{convert,reinterpret} <0> support Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).