So, we have a problem with the debug information:<div><br></div><div>There are two TAG_inlined_subroutine DIEs for the ToT clang, one of them with an AT_ranges.</div><div>For the Xcode clang, we have three DIEs (which makes sense, since we have three sum() calls).</div>
<div><br></div><div>Example lldb interaction:</div><div>Compiled with make CC=$(xcrun -f clang)</div><div><div>± ../../../../build/Debug/lldb a.out</div><div>Current executable set to 'a.out' (x86_64).</div><div>(lldb) b sum</div>
<div>Breakpoint 1: 3 locations.</div><div>(lldb) breakpoint list</div><div>Current breakpoints:</div><div>1: name = 'sum', locations = 3</div><div>  1.1: where = a.out`foo(int, int) + 99 [inlined] sum(int, int) at main.cpp:49, address = 0x0000000100000d43, unresolved, hit count = 0 </div>
<div>  1.2: where = a.out`foo(int, int) + 131 [inlined] sum(int, int) at main.cpp:51, address = 0x0000000100000d63, unresolved, hit count = 0 </div><div>  1.3: where = a.out`foo(int, int) + 155 [inlined] sum(int, int) at main.cpp:51, address = 0x0000000100000d7b, unresolved, hit count = 0 </div>
</div><div><br></div><div><br></div><div>Compiled with make (clang is ToT):</div><div><div>± ../../../../build/Debug/lldb a.out</div><div>Current executable set to 'a.out' (x86_64).</div><div>(lldb) b sum</div><div>
Breakpoint 1: where = a.out`foo(int, int) + 99 [inlined] sum(int, int) at main.cpp:49, address = 0x0000000100000d43</div><div>(lldb) breakpoint list </div><div>Current breakpoints:</div><div>1: name = 'sum', locations = 1</div>
<div>  1.1: where = a.out`foo(int, int) + 99 [inlined] sum(int, int) at main.cpp:49, address = 0x0000000100000d43, unresolved, hit count = 0 </div></div><div><br></div><div>So, should we bring this to the clang bugs page?</div>
<div>I'm sending the dwarfdump of both files attached.</div><div><br></div><div>Regards,</div><div><br clear="all">  Filipe<br><br>
<br><br><div class="gmail_quote">On Fri, Oct 26, 2012 at 12:19 PM, Filipe Cabecinhas <span dir="ltr"><<a href="mailto:filcab@gmail.com" target="_blank">filcab@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jim,<div><br></div><div><div>I just did an update to lldb and re-ran the test. Same result...</div><div><br></div><div>But...</div></div><div><br></div><div>If I use Xcode's clang (by passing -C $(xcrun -f clang)), it works.</div>

<div>If I use ToT clang (just updated and ran make install), it fails.</div><div><br></div><div>Attached are both log files. The problem is that, with ToT clang, breakpoint location 2.2 doesn't exist. Only 2.1.</div>
<div>
<br></div><div>Regards,</div><div><br clear="all">  Filipe<div><div class="h5"><br><br>
<br><br><div class="gmail_quote">On Thu, Oct 25, 2012 at 5:55 PM, Jim Ingham <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


This test case succeeds for me using TOT lldb and some fairly recent clang.  So it looks like the failure is due to some bug or difference in the debug output.  It would be easier to figure out what is going on if I could reproduce the failure.  What clang version are you using?<br>



<br>
Jim<br>
<div><div><br>
<br>
On Oct 25, 2012, at 4:41 PM, Filipe Cabecinhas <<a href="mailto:filcab@gmail.com" target="_blank">filcab@gmail.com</a>> wrote:<br>
<br>
> Hi all,<br>
><br>
> This test-case is failing (Mac OS X Mountain Lion, latest Xcode released, built using xcodebuild):<br>
> ./dotest.py -v -d -A x86_64 -C clang -v -t -f BreakpointIDTestCase.test_with_dsym<br>
><br>
> From what I can tell, after LLDB finds the DIE that has the inlined sum() function, it stops looking, although there is another inlined sum() function.<br>
> With that, the breakpoint will only resolve to one location.<br>
><br>
> At least I think that is what's happening. I'm not an expert on DWARF ;-)<br>
><br>
> Could you have a look at it, please?<br>
><br>
> Thanks,<br>
><br>
>   Filipe<br>
><br>
</div></div>> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
</blockquote></div><br></div></div></div><div><br></div>
</blockquote></div><br></div>