[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdevelop/languages/cpp/debugger
From:       Vladimir Prus <ghost () cs ! msu ! su>
Date:       2005-07-18 10:27:39
Message-ID: 1121682459.888265.8682.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 435822 by vprus:

Implement editing expression/variable values in variables window.

Now, by clicking on variable value user can edit it, and after pressing
enter the value is changed in the program.

This patch works fine, with exception of two things:

1. User can try to edit rvalue (say, value of "1+1"). Gdb does not allow
to query if value is editable so we have no way to prevent it. So, in this
case we need to display an error message and mark the expression as 
non-editable. 

(Note that in MI mode, we theoretically can query if var is editable, 
but gdb mistakenly reports that "1+1" is editable, so this is of no help).

2. It's possible to set the value of array with "{1, 2}". However, standard
   display of arrays does not show such composite value -- it only shows
   values of each individual element. Need to either show composite value
   in all cases, or clean the value column after value is assigned.

As a side effect, this patch makes clicking "-" on a expanded pointer
variable show again the pointer value, as opposed to pointed-to value.

* variablewidget.h
  (VariableTree::setValue): New signal
  (VariableTree::slotDoubleClicked,
   VariableTree::handleDoubleClicked): Remove for now, as
        this code was unused.
  (VarItem::originalName): New method.

* variablewidget.cpp:
  (VarItem::setOpen): Reload the value when closing item.

* gdbcontroller.h
  gdbcontroller.cpp
  (GDBController::slotSetValue): New slot.

 
BUG: 72183
CCMAIL: kdevelop-devel@kdevelop.org



 M  +4 -0      debuggerpart.cpp  
 M  +4 -1      gdbcommand.h  
 M  +17 -2     gdbcontroller.cpp  
 M  +7 -0      gdbcontroller.h  
 M  +46 -49    variablewidget.cpp  
 M  +11 -10    variablewidget.h  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic