[llvm-bugs] [Bug 24716] New: .debug_lines wrong when inlined functions are used.
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Sep 4 15:24:58 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24716
Bug ID: 24716
Summary: .debug_lines wrong when inlined functions are used.
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: dawn+bugzilla at burble.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
When inlined functions are used, Clang trunk reports 0 for line entries while
older clang versions report non-existent lines. To reproduce, compile the
following source using:
clang++ -c -g -o x.o x.cpp
x.h:
struct S {
int a;
S() : a(3) {}
int mfunc() {
return a;
}
};
x.cpp:
// Skip lines from x.h so we can make sure we're not seeing any lines
// reported from them in x.cpp.
// x.h:
// struct S {
// int a;
// S() : a(3) {}
// int mfunc() {
// return a;
// }
// };
#include "x.h"
S s;
then dump the .debug_line entries with your favorite dwarf dumper. objdump
--dwarf=decodedline was used here. Using clang 3.4, we see:
CU: ./x.cpp:
File name Line number Starting address
x.cpp 12 0x3b0
x.cpp 12 0x3bb
x.cpp 3 0x3d0
#FIXME!
x.cpp 3 0x3d4
#FIXME!
./x.h:
x.h 3 0x3e0
x.h 3 0x3f0
x.h 3 0x400
x.h 3 0x40c
The inlined code from the header file is being reported as being in x.cpp.
Using Clang 3.6 and trunk, these line numbers are 0 but still wrong.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150904/9adefdc7/attachment.html>
More information about the llvm-bugs
mailing list