summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-05-03 08:43:14 +0000
committerJakub Jelinek <jakub@redhat.com>2011-05-03 08:43:14 +0000
commit7b7d4608e4796c8a4396716432460b956aa8d324 (patch)
tree37f76ff75fa55ae62397f5d965dd0607516ea75a
parent85b42a26b76f4f516ac37731ad4809c6288db175 (diff)
downloadbinutils-redhat-7b7d4608e4796c8a4396716432460b956aa8d324.tar.gz
* dwarf.c (decode_location_expression): Handle DW_OP_GNU_const_type,
DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert and DW_OP_GNU_reinterpret.
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/dwarf.c58
2 files changed, 51 insertions, 11 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 3db85fcc93..4e709b6f41 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
2011-05-03 Jakub Jelinek <jakub@redhat.com>
+ * dwarf.c (decode_location_expression): Handle DW_OP_GNU_const_type,
+ DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
+ and DW_OP_GNU_reinterpret.
+
* MAINTAINERS: Add myself as DWARF2 maintainer.
2011-05-02 Alan Modra <amodra@gmail.com>
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index d8e66a35ba..b240af69c7 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1084,17 +1084,6 @@ decode_location_expression (unsigned char * data,
display_block (data, uvalue);
data += uvalue;
break;
- case DW_OP_GNU_entry_value:
- uvalue = read_leb128 (data, &bytes_read, 0);
- data += bytes_read;
- printf ("DW_OP_GNU_entry_value: (");
- if (decode_location_expression (data, pointer_size, offset_size,
- dwarf_version, uvalue,
- cu_offset, section))
- need_frame_base = 1;
- putchar (')');
- data += uvalue;
- break;
/* GNU extensions. */
case DW_OP_GNU_push_tls_address:
@@ -1143,6 +1132,53 @@ decode_location_expression (unsigned char * data,
data += offset_size + bytes_read;
}
break;
+ case DW_OP_GNU_entry_value:
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf ("DW_OP_GNU_entry_value: (");
+ if (decode_location_expression (data, pointer_size, offset_size,
+ dwarf_version, uvalue,
+ cu_offset, section))
+ need_frame_base = 1;
+ putchar (')');
+ data += uvalue;
+ break;
+ case DW_OP_GNU_const_type:
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf ("DW_OP_GNU_const_type: <0x%s> ",
+ dwarf_vmatoa ("x", cu_offset + uvalue));
+ uvalue = byte_get (data++, 1);
+ display_block (data, uvalue);
+ data += uvalue;
+ break;
+ case DW_OP_GNU_regval_type:
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf ("DW_OP_GNU_regval_type: %s (%s)",
+ dwarf_vmatoa ("u", uvalue), regname (uvalue, 1));
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf (" <0x%s>", dwarf_vmatoa ("x", cu_offset + uvalue));
+ break;
+ case DW_OP_GNU_deref_type:
+ printf ("DW_OP_GNU_deref_type: %ld", (long) byte_get (data++, 1));
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf (" <0x%s>", dwarf_vmatoa ("x", cu_offset + uvalue));
+ break;
+ case DW_OP_GNU_convert:
+ uvalue = read_leb128 (data, &bytes_read, 0);
+ data += bytes_read;
+ printf ("DW_OP_GNU_convert <0x%s>",
+ dwarf_vmatoa ("x", cu_offset + uvalue));
+ 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));
+ break;
/* HP extensions. */
case DW_OP_HP_is_value: