This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Decode expression lists used with DW_AT_byte_size and other DWARF attributes.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 18 Dec 2017 17:57:57 -0000
- Subject: [binutils-gdb] Decode expression lists used with DW_AT_byte_size and other DWARF attributes.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c54207d32681bb205c28facba73b6173ef15eabf
commit c54207d32681bb205c28facba73b6173ef15eabf
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Dec 18 17:57:18 2017 +0000
Decode expression lists used with DW_AT_byte_size and other DWARF attributes.
PR 22532
* dwarf.c (read_and_display_attr_value): Add attributes that might
use the DW_FORM_exprloc form, and if so, display the decoded
location expression list.
Diff:
---
binutils/ChangeLog | 7 +++++++
binutils/dwarf.c | 16 ++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index eb596d1..ee53c3a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2017-12-18 Nick Clifton <nickc@redhat.com>
+
+ PR 22532
+ * dwarf.c (read_and_display_attr_value): Add attributes that might
+ use the DW_FORM_exprloc form, and if so, display the decoded
+ location expression list.
+
2017-12-14 Alan Modra <amodra@gmail.com>
* testsuite/lib/utils-lib.exp (default_binutils_assemble_flags):
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index a92e7b1..dec4c2f 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2588,6 +2588,22 @@ read_and_display_attr_value (unsigned long attribute,
}
break;
+ case DW_AT_data_bit_offset:
+ case DW_AT_byte_size:
+ case DW_AT_bit_size:
+ case DW_AT_string_length_byte_size:
+ case DW_AT_string_length_bit_size:
+ case DW_AT_bit_stride:
+ if (form == DW_FORM_exprloc)
+ {
+ printf ("\t(");
+ (void) decode_location_expression (block_start, pointer_size,
+ offset_size, dwarf_version,
+ uvalue, cu_offset, section);
+ printf (")");
+ }
+ break;
+
case DW_AT_import:
{
if (form == DW_FORM_ref_sig8