gdb symbol lookup very slow

Antonio Cavallo <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi,
I'm having hard time debugging a (very large) C++ library under gdb (gdb 
7.7.1, gcc 4.8, binutils 2.22).

The main issue is the time it takes to reach a breakpoint: gdb takes an 
insane amount of time (order of 2mins) vs vs2012 (a couple of seconds).

I've profiled gdb and the top functions called during the debugging are 
(more than 90% is spent in these):

   strcmp_iw
   find_pc_sect_psymtab
   symbol_get_demangled_name
   symbol_search_name

I suspect gdb doesn't cache the symbols: is there any way to speedup 
this lookup? Is there any other explanation for why gdb is so much 
slower than visual studio?

I've repeated the run with lldb (from svn), and it is at least two times 
faster than gdb.

Any suggestion where to look for?

Thanks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.