This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix PR12616 - gdb does not implement DW_AT_data_bit_offset


*** TEST RESULTS FOR COMMIT da5b30da2d1167591aa8d71b543f97bfdc2ec2a2 ***

Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: da5b30da2d1167591aa8d71b543f97bfdc2ec2a2

Fix PR12616 - gdb does not implement DW_AT_data_bit_offset

The DW_AT_data_bit_offset attribute was introduced by DWARF V4 and
allows specifying the offset of a data member within its containing
entity.  But although the new attribute was intended to replace
DW_AT_bit_offset for this purpose, GDB ignores it, and thus GCC still
emits DW_AT_bit_offset instead.  See also
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71669.

This change fixes GDB's lack of support for DW_AT_data_bit_offset and
adds an appropriate test case.

gdb/ChangeLog:

	PR gdb/12616
	* dwarf2read.c (dwarf2_add_field): Handle the DWARF V4 attribute
	DW_AT_data_bit_offset.

gdb/testsuite/ChangeLog:

	PR gdb/12616
	* gdb.dwarf2/nonvar-access.exp: New testcase.  Check that GDB
	respects the DW_AT_data_bit_offset attribute.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]