<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - .debug_lines wrong when inlined functions are used."
href="https://llvm.org/bugs/show_bug.cgi?id=24716">24716</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>.debug_lines wrong when inlined functions are used.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dawn+bugzilla@burble.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>