aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-12-18 17:57:18 +0000
committerNick Clifton <nickc@redhat.com>2017-12-18 17:57:18 +0000
commitc54207d32681bb205c28facba73b6173ef15eabf (patch)
tree88a798f2c7c583062d6cf602d242bcec23aa074d /binutils/dwarf.c
parent4f588891ac7d4653e1bd861ca38c2a4e6d5e907c (diff)
downloadgdb-c54207d32681bb205c28facba73b6173ef15eabf.zip
gdb-c54207d32681bb205c28facba73b6173ef15eabf.tar.gz
gdb-c54207d32681bb205c28facba73b6173ef15eabf.tar.bz2
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.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c16
1 files changed, 16 insertions, 0 deletions
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