GDB Load Symbols & Wishes

Clarke, Jason, RBSGC Jason.Clarke at rbsgc.com
Thu Apr 3 17:28:13 UTC 2008


I'm basing all my comments on what I observe GDB to be doing in my top. 
There are 2 major CPU hits one seems to be when there is the iteration
over the threads (I can see them refreshing one by one in my gui) and
then second seems to be the the loading of the locals window. In terms
of the threads, the app I'm using has about 15 of them.

By far the worst is the locals window, it maxes out a cpu for a few
seconds, so my comments where aimed at trying to lessen the hit for such
a step. So only deep query an object if explicitly required. As you can
guess waiting a couple of seconds for a step in a debugger can get old
quite quickly.

In terms of a comparison I'm also using Totalview and it exhibits non of
these problems on the same system. But  Kdevelop > Totalview.

I know this isn't the list for it, but GDB seems to be a bit on the slow
side in loading symbols, I checked up and there's a bug report/wish
raised in the GDB project already.

Otherwise, KDevelop really has improved a tonne in terms of the debugger
in the past few iterations. So I eagerly await KDevel 4 and the improved
locals algorithm.



-----Original Message-----
From: kdevelop-devel-bounces at barney.cs.uni-potsdam.de
[mailto:kdevelop-devel-bounces at barney.cs.uni-potsdam.de] On Behalf Of
Vladimir Prus
Sent: Thursday, April 03, 2008 12:55 PM
To: kdevelop-devel at barney.cs.uni-potsdam.de
Subject: Re: GDB Load Symbols & Wishes


Clarke, Jason, RBSGC wrote:

> A summary of the following thread;
>  
> http://www.kdevelop.org/phorum5/read.php?9,31735
>  
> 1.) Is there any way to add a progress bar for gdb when it's doing
> something, for example loading symbols when attaching to a process?

No. GDB does not provide any progress reporting for internal operations
like loading symbol tables. It only provides reporting for the 'load'
operations.

The forum thread mentions that it's hard to tell if GDB is busy, or not.
Indeed the single status letter shown at the right of the status bar is
not
very obvious, probably this can be improved.

> 2.)  From what I've gleaned GDB is quite slow with multithreaded
> applications, due to lack of caching of symbols/stacks. My suggestion 
> (if possible) to help things, is to do shallow queries in objects in
the
> locals window until that object is expanded. Is there ability in the
GDB
> api to do so? E.g. if you have an object on the stack and you step
> through some code, it should only display that objects address, and
not
> deep query it, until explicitly clicking expand like "plus".

Unless I forgot something, the only difference between ST and MT
programs
is that in MT programs, after stop, we iterate over each thread and get
the
the information about innermost frame. That does not sound very complex 
(although GDB CVS HEAD has a command to get the information in one go).
What
exactly do you see as taking lot of time?

And speaking of "shallow" fetch, it should only matter on target where
access to memory is very slow -- basically only embedded remote targets.

- Volodya



_______________________________________________
KDevelop-devel mailing list
KDevelop-devel at kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
********************************************************************

This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorized
to retain, read, copy or disseminate this message or any part of
it.

********************************************************************




More information about the KDevelop-devel mailing list