Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Performance, stepping into source for shared libs
@ 2007-07-01 23:34 Arne Steinarson
  2007-07-02  0:04 ` Nick Roberts
  2007-07-02  1:42 ` Daniel Jacobowitz
  0 siblings, 2 replies; 4+ messages in thread
From: Arne Steinarson @ 2007-07-01 23:34 UTC (permalink / raw)
  To: gdb

I have a C++ app with just a small main.cpp. However
it links into large libraries (GTK and framework on
top of GTK, running i386 Linux).

Most times when I open the app in GDB I will have
quite a delay when stepping into a lower function the
first time. CPU usage goes to 100% and it takes
between 10 and 60 seconds before I can see the new
source line. The next time stepping into the same
function, it happens without delay.

Stepping into a new function in another source file
(possibly in the same directory as the last one) I
again have the long delay.

It seems to happen mostly with functions in shared
libraries.

First I thought it was the IDE (Eclipse) to blame. So
I tried in GDB standalone, command line version. Same
delay!

Is there some way to reduce these waits?

What is GDB up to during this time (it doesn't give
any feedback)?

Regards
// ATS


      Låt vårkänslorna spira!
Hitta din tvillingsjäl på Yahoo! Dejting: http://se.meetic.yahoo.net


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: Performance, stepping into source for shared libs
@ 2007-07-02  8:57 Arne Steinarson
  0 siblings, 0 replies; 4+ messages in thread
From: Arne Steinarson @ 2007-07-02  8:57 UTC (permalink / raw)
  To: gdb

After doing some searching, I found this thread from
January: 

http://www.ecos.sourceware.org/ml/gdb/2007-01/msg00020.html

It's the same problem I have, I'm also on Debian
system (Ubuntu), with GDB 6.6. Apparently GDB is
single stepping through loading and resolving every
symbol of the shared library. 

Setting LD_BIND_NOW to non-empty value solves the
problem.

Hoping a fix of this issue could make it into future
release. 

Regards
// Arne S.


      Låt vårkänslorna spira!
Hitta din tvillingsjäl på Yahoo! Dejting: http://se.meetic.yahoo.net


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-02  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-01 23:34 Performance, stepping into source for shared libs Arne Steinarson
2007-07-02  0:04 ` Nick Roberts
2007-07-02  1:42 ` Daniel Jacobowitz
2007-07-02  8:57 Arne Steinarson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox