<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Debug information not being generated"
href="http://llvm.org/bugs/show_bug.cgi?id=15405">bug 15405</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>WORKSFORME
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Debug information not being generated"
href="http://llvm.org/bugs/show_bug.cgi?id=15405#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Debug information not being generated"
href="http://llvm.org/bugs/show_bug.cgi?id=15405">bug 15405</a>
from <span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=15405#c11">comment #11</a>)
<span class="quote">> I have not been able to find the time to run this on the gdb test suite.
>
> However, Dave's fix led me to realise that debug information was
> deliberately being suppressed because it would be unnecessary: in this case
> the debug information for the call instruction in question is guaranteed to
> be the same as for the preceding instruction.
>
> It seems then that it would be better for me to adapt my tool on top of
> CLANG to deal with this scenario rather than fixing the issue (which appears
> to be a design decision, not a bug) in CLANG.
>
> If you agree then please go ahead and close the bug.
>
> Thanks for your help!
>
> Ally</span >
Coming back to this, I'm not sure I agree that this is the right thing for
clang to do - the code in question breaks inlining which doesn't walk backwards
from the call instruction looking for the last IR instruction to include a
DebugLoc. Inlining just uses the debugloc of the call instruction - if it has
none, but the calling function does, and the caller does have debug info, just
no debugloc on this specific call instruction, bad things happen... the
debugloc doesn't get wired up appropriately.
I'm looking at fixing this one way or another - either removing these hacks
(they might not be relevant anymore anyway - the DebugLoc encoding is now
fairly efficient/low-cost, I believe, perhaps it wasn't when this hack was
added?) or figuring out where to re-enable location information once we're
passed the unconditional jump that these hacks were intended to skip debugloc
for (but before we emit any more function calls/user-implied code)</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>