[Bug 72183] editing variables in debugger

Vladimir Prus ghost at cs.msu.su
Mon Jul 18 12:28:31 UTC 2005


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=72183         
ghost cs msu su changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From ghost cs msu su  2005-07-18 12:27 -------
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




More information about the KDevelop-devel mailing list