branches/kdevelop/3.4/languages/cpp/debugger

Vladimir Prus ghost at cs.msu.su
Thu Dec 15 14:54:09 UTC 2005


On Thursday 15 December 2005 15:26, Robert Gruber wrote:
> SVN commit 488681 by rgruber:
>
> If the "Locals" item from the variable-tree isn't open we
> don't need to run "info local" and "info args" all the time.
> This will speed up stepping though code that has a lot of
> local variables.

That's a good thing!

> --- branches/kdevelop/3.4/languages/cpp/debugger/gdbcontroller.cpp
> #488680:488681 @@ -1973,8 +1973,15 @@
>
>  void GDBController::slotProduceVariablesInfo()
>  {
> -    queueCmd(new GDBCommand("info args", NOTRUNCMD, INFOCMD, ARGS));
> -    queueCmd(new GDBCommand("info local", NOTRUNCMD, INFOCMD, LOCALS));
> +    if (stateIsOn(s_viewLocals)) {
> +        queueCmd(new GDBCommand("info args", NOTRUNCMD, INFOCMD, ARGS));
> +        queueCmd(new GDBCommand("info local", NOTRUNCMD, INFOCMD,
> LOCALS)); +    }
> +/*
> +    else {
> +        kdDebug(9012) << "s_viewLocals = No locals needed!" << endl;
> +    }
> +*/

Could you avoid commented out code? There's quite a bit of this in debugger 
part already.

And actually, why do you need to first communicate state to gdbcontroller, and 
then check it in gdbcontroller?. Would not modifying 
variableTree::slotCurrentFrame from:

    if (frame->needLocals() || justPaused_) 
    {
        setActiveFlag();
        // This will eventually call back to slotParametersReady and 
        // slotLocalsReady
        emit produceVariablesInfo();

to 

    if (frame->needLocals() || justPaused_) 
    {
       if (frame->isOpen())
       {
          setActiveFlag();
          // This will eventually call back to slotParametersReady and 
          // slotLocalsReady
          emit produceVariablesInfo();
        }

be a clearer approach?

Thanks,
Volodya




More information about the KDevelop-devel mailing list