This is the mail archive of the
mailing list for the GDB project.
Re: gdb symbol lookup very slow
- From: Andrew Burgess <aburgess at broadcom dot com>
- To: <gdb at sourceware dot org>
- Cc: <a dot cavallo at cavallinux dot eu>
- Date: Wed, 28 May 2014 09:56:07 +0100
- Subject: Re: gdb symbol lookup very slow
- Authentication-results: sourceware.org; auth=none
- References: <53859746 dot 7030601 at cavallinux dot eu>
On 28/05/2014 8:59 AM, Antonio Cavallo wrote:
> I'm having hard time debugging a (very large) C++ library under gdb (gdb
> 7.7.1, gcc 4.8, binutils 2.22).
Details of your target architecture / operating system /etc would be
> 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):
> 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 suspect you've not mentioned something important :) In "normal"
circumstances, once a breakpoint has been placed, and the program being
debugged has been resumed, then there should be no time spent inside gdb.
Are you by chance using conditional breakpoints? Or stepping, or using
some other commands?
The best thing would be to post a small example session, an annotate
which commands you feel are taking longer than expected. Also, you
mention that you profiled gdb, assuming that it's not too large, making
the profile data available might allow some more insight.
Thanks for reporting this issue, and taking the time to investigate it.