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.outfoo(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.outfoo(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
dwarfdump-ToT-clang.log (287 KB)
dwarfdump-Xcode-clang.log (287 KB)