[lldb-dev] regarding [Bug 15671] New: backtrace truncated after assertion failure in inferior
jmolenda at apple.com
Thu Jul 18 14:43:30 PDT 2013
On Jul 18, 2013, at 11:01 AM, Thirumurthi, Ashok <ashok.thirumurthi at intel.com> wrote:
> Thanks for the suggestion, that sounds like an optimal mix of performance and functionality. Perhaps this use-based search would be more efficient if we can use the current PC to limit the parsing to a single FDE.
I believe the most expensive part of reading the eh_frame section is scanning the entire section to build up an index of CIE and FDE entries.
> Say, is it possible to run into this situation outside of the unwinder as well (i.e. disassembly or step-in)? Here's what I get for a test case that used to show the partial backtrace:
> (lldb) bt
> * thread #1: tid = 0x3030, 0x00007f9ca7d17425 libc.so.6`raise + 53, name = 'a.out, stop reason = signal SIGABRT
> frame #0: 0x00007f9ca7d17425 libc.so.6`raise + 53
> frame #1: 0x00007f9ca7d1ab8b libc.so.6`abort + 379
> frame #2: 0x00007f9ca7d100ee libc.so.6
> frame #3: 0x00007f9ca7d10192 libc.so.6`__assert_fail + 66
> frame #4: 0x00000000004005c0 a.out`main(argc=1, argv=0x00007fffa7b6c108) + 112 at main.c:18
> frame #5: 0x00007f9ca7d0276d libc.so.6`__libc_start_main + 237
> frame #6: 0x0000000000400489 a.out`_start + 41
> (lldb) disassemble -a 0x00007f9ca7d100ee
> error: Could not find function bounds for address 0x7f9ca7d100ee
> I tried "log enable --verbose lldb default", but there were no clues as to the reason for the failure. I suspect that the use-based search would need to be implemented in more than one part of lldb. Cheers,
In this case the unwinder got the functions details for frame 2 (0x00007f9ca7d100ee) from the eh_frame information -- but the rest of lldb doesn't know anything about that function. This is where the ObjectFile needs to add the start/end address and a synthesized name to the list of symbols. (e.g. ___lldb_unnamed_function3087$$libc would be a typical synthesized function name for a stripped binary on Mac OS X).
More information about the lldb-dev