문제

I have a larger C++ programm with lot of templates which i want to debug. Unfortunately gdb takes several minutes to read the symbols.

http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html contains lots of options for debugging.

Which options would you suggest to make gdb faster/more usable.

Update: It looks like the slow down is caused by libtool. If gdb is launched via libtool --mode execute it is slow. If gdb is launched gdb .libs/foo it is reasonable fast. Any ideas why is much slower?

Update: Another suggestion was -fvisibility=hidden see http://gcc.gnu.org/wiki/Visibility

올바른 솔루션이 없습니다

다른 팁

Sometimes using -fdebug-types-section can make things a bit faster. It isn't guaranteed though.

Several minutes to load ... I wonder how big this executable is. If I were desperate I might try only compiling selected modules with debug info. Or perhaps look to see if it is a gdb bug. If it is split into an executable and some shared libraries, and some parts don't change very often, you could also look into using the "gdb index" feature (see the manual) to speed up the loading of debuginfo for those modules.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top