[llvm-dev] [LLD] Slow callstacks in gdb
Rafael Avila de Espindola via llvm-dev
llvm-dev at lists.llvm.org
Tue Nov 28 09:46:46 PST 2017
Martin Richtarsky <s at martinien.de> writes:
>> Is the program being built by gcc or clang?
> gcc 6, but I can try clang.
>> Are both using --gdb-index? Can you try lld trunk if so?
>> Is any of the programs you tested open source?
> Here is some more info. I enabled "set verbose on" in gdb. With this
> setting, I'm getting DWARF errors in both versions when executing "bt"
> (linked by gold and lld), but the lld version has significantly more
> errors. These only appear in the lld version:
> (gdb) bt
> Reading in symbols for abc.cpp....
> debug_line address at offset 0x575128 is 0 [in module abc.so]....
> debug_line address at offset 0x575141 is 0 [in module abc.so]....
> cannot get low and high bounds for subprogram DIE at 52844002...
> cannot get low and high bounds for subprogram DIE at 52844042...
> cannot get low and high bounds for subprogram DIE at 52844092...
> const value length mismatch for 'std::ios_constants::boolalpha', got 4,
> expected 0
> debug info gives command-line macro definition with non-zero line 13: __MACRO
> macro '__USE_ISOC95' is #undefined twice
> macro `__STDC_LIMIT_MACROS' redefined at...
> Member function "~basic_istream" (offset 28792309) is virtual but the
> vtable offset is not specified...
> Maybe gdb needs to fall back to slower line number resolution because e.g.
> low and high bounds cannot be retrieved and debug_line_address is 0?
It is hard to know without a reproducible. I tried gdb on clang itself
build with both clang and gcc and linked with gold and lld. I could not
reproduce the slowdown, but I was using trunk lld.
More information about the llvm-dev