debugger request

John Birch John.Birch at xtra.co.nz
Tue Jul 18 23:01:38 BST 2000


On Wed, 19 Jul 2000, you wrote:
> Am Die, 18 Jul 2000 schrieben Sie:
> > So... take a look at setupInternalDebugger() in ckdevelop.cpp and try
> > adding var_viewer->setFocus() ?? somewhere appropriate. See if that works
> > :-) If you feel that works really nice, then I'll accept the patch :-)
>
> nope, it's not setFocus. But if you append the method by:
> setupInternalDebugger()
> {
> ...
> 		slotTCurrentTab(VAR);
> 	slotTTabSelected(VAR);
> }
>
> It will do the trick.

Cool - will patch this soon

> BTW wouldn't it be better to use enumerations for the
> tab numbers.  Much more type safe...

Maybe - I haven't looked into that :-)

>
> > Ah - this is an issue with speed and stepping. Having the variable list
> > open means I must do a "info local". If the local list is large this
> > command, at the gdb end,  takes a loooong time causing stepping through
> > code to be slow. Having the tree "deflated" means I can avoid this slow
> > down. So what's it to be, slow stepping or one extra click? (or, eeek,
> > another option :-)
>
> Yes, but reaching the first breakpoint - what will be your first action,
> hmmm? Right, inflating the variable tree. Why else would I invoke the
> debugger? Gimme a hint, like the one above, and I'll do the rest & test it.
> (What about an option flag?)

Hmm, I don't quite agree with you :-) Quite often, I want to break at a point 
in code and then just step through, watching the application output and the 
code at the same time and making sure it follows the path I think it should. 
The var values are unimportant in this situation. Mainly I do this when 
dealing with someone elses code I'm not familiar with and trying to 
understand whats happening.

But the speed problem is only evident if the local list is large, and that 
shouldn't happen too often. So I think I don't mind one way or the other :-)

Anyway - take a look into dbg/vartree.cpp
void FrameRoot::setLocals(char* locals)
and change 
  if (isOpen())
    setOpen(true);

too
//  if (isOpen())
    setOpen(true);

I forget how this code works now so it might not be right :-)
Let us know your good fix, and I'll add it to cvs.

jbb




More information about the KDevelop mailing list