Gas only emits .loc into .debug_line at the next following instruction. One
peculiar consequence of this drives me nuts when writing test cases: if I use
.loc followed by .byte, nothing is generated.
A more interesting consequence is this one:
.file 1 "line-align.s"
.text
.globl sym
.p2align 3
sym: .loc 1 40 0
nop
label:
.loc 1 41 0
.p2align 3
nop
.loc 1 42 0
nop
gas will give "label" address 0x1, but put line 41 starting at address 8. The
nop inserted for .p2align is incorrectly associated with the previous line. In
my original testcase, label was LBB31; a label used by GCC for debug info. So
GCC's .debug_info says an inlined function begins at "label", but the line table
lists the line before the start of the inlined function.
--
Summary: gas incorrectly associates .loc with instructions
Product: binutils
Version: 2.19 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gas
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: drow at sources dot redhat dot com
CC: bug-binutils at gnu dot org
GCC host triplet: x86_64-pc-linux-gnu
http://sourceware.org/bugzilla/show_bug.cgi?id=6717
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
_______________________________________________
bug-binutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-binutils