[lldb-dev] Failing BreakpointIDTestCase

Greg Clayton gclayton at apple.com
Mon Oct 29 10:17:27 PDT 2012


Filipe, thanks for pointing this out. I filed a bug on this internally here at apple (<rdar://problem/12592135>).

Greg

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

> 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
> 
> 
> 
> 
> <dwarfdump-ToT-clang.log><dwarfdump-Xcode-clang.log>_______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev





More information about the lldb-dev mailing list