This is the mail archive of the
mailing list for the GDB project.
Re: gdb symbol lookup very slow
- From: Antonio Cavallo <a dot cavallo at cavallinux dot eu>
- To: gdb at sourceware dot org
- Date: Wed, 28 May 2014 23:43:01 +0100
- Subject: Re: gdb symbol lookup very slow
- Authentication-results: sourceware.org; auth=none
- References: <53859746 dot 7030601 at cavallinux dot eu> <5385A4A7 dot 2010909 at broadcom dot com>
thank you for the reply.
Andrew Burgess wrote:
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 target is x86_64, it's centos (red hat 6.5) system;
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.
The break point is "pending" because the library to be debugged is not
loaded at the main debuggee startup.
Are you by chance using conditional breakpoints? Or stepping, or using
some other commands?
After the gdb starts (gdb --args <myprogram> <arguments>) I simply set
the breakpoint (pending) and run the application: at that point after
2mins it reaches the breakpoint.
As test I've run the gdb --args <myprogram> <arguments> without the
breakpoint and the app completes in under few seconds. So the
performance hit might be due to the breakpoint (and the libraries loaded).
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.
I'll grab all the info I can get out of it. In the meanwhile is there
anything I can try to check what might cause that?
Thanks for reporting this issue, and taking the time to investigate it.