summaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-06-22 15:03:18 +0000
committerJakub Jelinek <jakub@redhat.com>2011-06-22 15:03:18 +0000
commitc0d45a51852a7e406c33d2e62f2d190ee71fbf2b (patch)
treef9677a9111c397b5436c39595946a65e8f8231f7 /binutils/dwarf.c
parentf0a7b96d2f86a825ae62a6ba02608d371e9bae1b (diff)
downloadbinutils-redhat-c0d45a51852a7e406c33d2e62f2d190ee71fbf2b.tar.gz
* 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.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 46c454adf6..f5a8d7bf17 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1179,13 +1179,18 @@ decode_location_expression (unsigned char * data,
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. */