Bug 71669 - DW_AT_data_bit_offset is not emitted for dwarf4 and above
Summary: DW_AT_data_bit_offset is not emitted for dwarf4 and above
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 6.1.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-26 20:36 UTC by Andrew Pinski
Modified: 2017-01-17 17:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2016-06-26 20:36:02 UTC
http://www.dwarfstd.org/ShowIssue.php?issue=081130.1

Due to the no so nice parts of DW_AT_bit_offset for little-endian, the dwarf standard come up with DW_AT_data_bit_offset  to fix that.

DW_AT_bit_offset has been deprecated for dwarf4.
Comment 1 Andrew Pinski 2016-06-26 20:38:42 UTC
Note GDB does not support it yet:
https://sourceware.org/bugzilla/show_bug.cgi?id=12616
Comment 2 Jakub Jelinek 2017-01-17 17:42:38 UTC
Author: jakub
Date: Tue Jan 17 17:42:06 2017
New Revision: 244542

URL: https://gcc.gnu.org/viewcvs?rev=244542&root=gcc&view=rev
Log:
	PR debug/71669
	* dwarf2out.c (add_data_member_location_attribute): For constant
	offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
	instead of DW_AT_data_member_location, DW_AT_bit_offset and
	DW_AT_byte_size attributes.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
Comment 3 Jakub Jelinek 2017-01-17 17:46:55 UTC
Fixed on the trunk (if you use -gdwarf-5).