[lldb-dev] Failing BreakpointIDTestCase

Filipe Cabecinhas filcab at gmail.com
Fri Oct 26 12:28:41 PDT 2012


So, we have a problem with the debug information:

There are two TAG_inlined_subroutine DIEs for the ToT clang, one of them
with an AT_ranges.
For the Xcode clang, we have three DIEs (which makes sense, since we have
three sum() calls).

Example lldb interaction:
Compiled with make CC=$(xcrun -f clang)
± ../../../../build/Debug/lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) b sum
Breakpoint 1: 3 locations.
(lldb) breakpoint list
Current breakpoints:
1: name = 'sum', locations = 3
  1.1: where = a.out`foo(int, int) + 99 [inlined] sum(int, int) at
main.cpp:49, address = 0x0000000100000d43, unresolved, hit count = 0
  1.2: where = a.out`foo(int, int) + 131 [inlined] sum(int, int) at
main.cpp:51, address = 0x0000000100000d63, unresolved, hit count = 0
  1.3: where = a.out`foo(int, int) + 155 [inlined] sum(int, int) at
main.cpp:51, address = 0x0000000100000d7b, unresolved, hit count = 0


Compiled with make (clang is ToT):
± ../../../../build/Debug/lldb a.out
Current executable set to 'a.out' (x86_64).
(lldb) b sum
Breakpoint 1: where = a.out`foo(int, int) + 99 [inlined] sum(int, int) at
main.cpp:49, address = 0x0000000100000d43
(lldb) breakpoint list
Current breakpoints:
1: name = 'sum', locations = 1
  1.1: where = a.out`foo(int, int) + 99 [inlined] sum(int, int) at
main.cpp:49, address = 0x0000000100000d43, unresolved, hit count = 0

So, should we bring this to the clang bugs page?
I'm sending the dwarfdump of both files attached.

Regards,

  Filipe



On Fri, Oct 26, 2012 at 12:19 PM, Filipe Cabecinhas <filcab at gmail.com>wrote:

> Hi Jim,
>
> I just did an update to lldb and re-ran the test. Same result...
>
> But...
>
> If I use Xcode's clang (by passing -C $(xcrun -f clang)), it works.
> If I use ToT clang (just updated and ran make install), it fails.
>
> Attached are both log files. The problem is that, with ToT clang,
> breakpoint location 2.2 doesn't exist. Only 2.1.
>
> Regards,
>
>   Filipe
>
>
>
>
> On Thu, Oct 25, 2012 at 5:55 PM, Jim Ingham <jingham at apple.com> wrote:
>
>> 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?
>>
>> Jim
>>
>>
>> On Oct 25, 2012, at 4:41 PM, Filipe Cabecinhas <filcab at gmail.com> wrote:
>>
>> > Hi all,
>> >
>> > This test-case is failing (Mac OS X Mountain Lion, latest Xcode
>> released, built using xcodebuild):
>> > ./dotest.py -v -d -A x86_64 -C clang -v -t -f
>> BreakpointIDTestCase.test_with_dsym
>> >
>> > 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.
>> > With that, the breakpoint will only resolve to one location.
>> >
>> > At least I think that is what's happening. I'm not an expert on DWARF
>> ;-)
>> >
>> > Could you have a look at it, please?
>> >
>> > Thanks,
>> >
>> >   Filipe
>> >
>> > _______________________________________________
>> > lldb-dev mailing list
>> > lldb-dev at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121026/adb9681e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarfdump-ToT-clang.log
Type: application/octet-stream
Size: 293604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121026/adb9681e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dwarfdump-Xcode-clang.log
Type: application/octet-stream
Size: 294008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20121026/adb9681e/attachment-0001.obj>


More information about the lldb-dev mailing list