Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Antonio Cavallo <a.cavallo@cavallinux.eu>
To: gdb@sourceware.org
Subject: Re: gdb symbol lookup very slow
Date: Thu, 29 May 2014 02:48:00 -0000	[thread overview]
Message-ID: <53866675.5060605@cavallinux.eu> (raw)
In-Reply-To: <5385A4A7.2010909@broadcom.com>


Hi,

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
> helpful.

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.
>
> Andrew
>

Thanks
Antonio


  reply	other threads:[~2014-05-28 22:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28  8:56 Antonio Cavallo
2014-05-28 22:43 ` Andrew Burgess
2014-05-29  2:48   ` Antonio Cavallo [this message]
2014-05-29 20:40 ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53866675.5060605@cavallinux.eu \
    --to=a.cavallo@cavallinux.eu \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox