aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.perf/disassemble.py
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2021-08-20 10:05:10 -0600
committerTom Tromey <tromey@adacore.com>2021-09-24 09:29:09 -0600
commit6ad036d703099508c388038b57c77a8f7aaffb1d (patch)
tree72713be9603f7a609a6adfd96b3bed39f577f6c1 /gdb/testsuite/gdb.perf/disassemble.py
parentfbd6ddfdbf6c41fed3f355e278f68e8e0433ad0d (diff)
downloadbinutils-6ad036d703099508c388038b57c77a8f7aaffb1d.zip
binutils-6ad036d703099508c388038b57c77a8f7aaffb1d.tar.gz
binutils-6ad036d703099508c388038b57c77a8f7aaffb1d.tar.bz2
Fix handling of DW_AT_data_bit_offset
A newer version of GCC will now emit member locations using just DW_AT_data_bit_offset, like: <3><14fe>: Abbrev Number: 1 (DW_TAG_member) <14ff> DW_AT_name : (indirect string, offset: 0x215e): nb_bytes <1503> DW_AT_decl_file : 1 <1503> DW_AT_decl_line : 10 <1504> DW_AT_decl_column : 7 <1505> DW_AT_type : <0x150b> <1509> DW_AT_bit_size : 31 <150a> DW_AT_data_bit_offset: 64 whereas earlier versions would emit something like: <3><164f>: Abbrev Number: 7 (DW_TAG_member) <1650> DW_AT_name : (indirect string, offset: 0x218d): nb_bytes <1654> DW_AT_decl_file : 1 <1655> DW_AT_decl_line : 10 <1656> DW_AT_decl_column : 7 <1657> DW_AT_type : <0x165f> <165b> DW_AT_byte_size : 4 <165c> DW_AT_bit_size : 31 <165d> DW_AT_bit_offset : 1 <165e> DW_AT_data_member_location: 8 That is, DW_AT_data_member_location is not emitted any more. This is a change due to the switch to DWARF 5 by default. This change pointed out an existing bug in gdb, namely that the attr_to_dynamic_prop depends on the presence of DW_AT_data_member_location. This patch moves the handling of DW_AT_data_bit_offset into handle_data_member_location, and updates attr_to_dynamic_prop to handle this new case. A new test case is included. This test fails with GCC 11, but passes with an earlier version of GCC.
Diffstat (limited to 'gdb/testsuite/gdb.perf/disassemble.py')
0 files changed, 0 insertions, 0 deletions