2 problems with debugger

Andreas Pakulat apaku at gmx.de
Sun Nov 5 22:02:11 UTC 2006


On 05.11.06 23:23:06, Vladimir Prus wrote:
> On Sunday 05 November 2006 19:09, Andreas Pakulat wrote:
> > 1. Startup of kdevelop inside kdevelop is really slow here and it seems
> > it got sth. to do with how many breakpoints I have set and enabled. I
> > tend to set breakpoints when I debug sth but never unset them, unless in
> > a later debug session I stumble upon them. So I had like 20 breakpoints
> > in the qmake manager set and it seems that kdevelop debugger takes ages
> > to set them all.
> >
> > I also noted that a self-compiled gdb 6.5 is a bit faster than the
> > debian packaged gdb 6.4.90 (which the maintainer claims to be nearly the
> > same as 6.5)
> >
> > I can't attach a konsole output, too big. I put it on
> >
> > www.apaku.de/vardata/debugger.out
> >
> > It contains the logs from 2 debug session, the first starts kdevelop
> > with no breakpoints and then I set a couple of breakpoints and start it
> > again.  The 2nd case needed approx 12 minutes to start, while the first
> > was nearly instantanious.
> 
> Looking at the log, the problem is obvious, while the solution is not quite. 

Thats what I thought too :)

> Most of KDevelop code is in libraries, which are loaded after startup. When 
> you start KDevelop gdb does not yet see those libraries, so it tries to 
> reinsert breakpoint after each plugin is loaded, which takes quite some time.

Yeah, is there a way to give gdb a list of breakpoints on the
commandline and tell him to try to load them on each lib-load? I'd like
to check wether "plain" gdb behaves the same...

> I'm not sure though how it comes to take 12 mins.

Well, as I said its better with self-compiled gdb6.5, thus I also
suspect the debian package to have a problem here (they have some extra
patches and they compile with -O2 -g).

> In fact, it looks that you've used the "restart" button as opposed to stopping 
> the debugger and staring it aflesh.

I always press stop and then hit F9/start program, I may have forgotten
to press stop that time but I certainly didn't hit the restart programm
button.

> Can you check if stopping/starting works 
> better? I might be that gdb does something wrong exactly in "restart" 
> scenario, in which case I might be able to fix something.

Ok, freshly started kdevelop, took about 6 minutes with 34 breakpoints
using debian-gdb, 2 minutes with self-compiled gdb. I guess I should
write a bugreport to debian, seems like their gdb is slow at loading lib
symbols (the most time is consumed loading all the plugins).

Also do you know wether the time for setting those breakpoints depends
on the CPU speed that much? teatime tested a it without any breakpoints
and needed 11 seconds till full kdev, I need about a minute (IIRC). And
with 13 breakpoints it took him about a minute. He has a AMD2500, while
I have a Pentium M 1.4GHz... 

Andreas

-- 
Abandon the search for Truth; settle for a good fantasy.




More information about the KDevelop-devel mailing list