From kdevelop-devel Thu Jun 09 10:07:32 2005 From: Vladimir Prus Date: Thu, 09 Jun 2005 10:07:32 +0000 To: kdevelop-devel Subject: [PATCH] Improved variables view Message-Id: <200506091407.32929.ghost () cs ! msu ! su> X-MARC-Message: https://marc.info/?l=kdevelop-devel&m=111831174406302 Hello! Attached is the patch that implements most of my suggestions for the variables view. Now on variables in the current frame are shown. It's possible to either evaluate an expression, or add a watch. The list of recently evaluated expressions is shown in the variables view, and it's possible to change a name of such expression to something more memorable. Additionally, I've somewhat refactored interaction between gdbcontroller and variablewidget. Previously, gdbcontroller called a large number of vartree functions, now most interaction is done with signals, which I find a bit cleaner. What I did not yet do is changing variables right in var widget, but my patch has grown long enough already ;-) A couple of snapshots are http://zigzag.cs.msu.su/~ghost/variables_during_debugging.png http://zigzag.cs.msu.su/~ghost/variables_popup.png The patch is at http://zigzag.cs.msu.su/~ghost/new_vars_view.diff (if I attach it, I run of of mainling list posting size limit) Log message is at the end of the message. Comments are very welcome! - Volodya Log message: 1. Do not immediately switch frames and hide framestack widget, when opening an item corresponding to a frame. Switch frame only when frame item is explicitly selected. See http://barney.cs.uni-potsdam.de/mailman/private/kdevelop-devel/2005-May/033098.html for rationale. 2. Show only variables for the current frame in variables view 3. Allow to either evaluate an expression, and add it to the list of watched expressions. 4. Refactor communication between gdbcontroller and variableswidget to reduce the number of direct calls from gdbcontroller to methods of variableswidget. * gdbcontroller.h gdbcontroller.cpp: (GDBController::slotProduceBacktrace): New slot. Gets backtrace for a thread via "thread apply XXX backtrace" and so doesn't change current thread. (GDBController::slotProduceVariablesInfo): New slot. Gets info about parameters and local variables of a function. (GDBController::parametersReady, GDBController::localsReady): New signals, emitted whenever gdb parses the corresponding reply from gdb. (GDBController::currentFrame): New signal, emitted after current frame might have changed. (GDBController::actOnProgramPause): Do not issue "info locals". Emit 'currentFrame'. (GDBController::programNoApp): Don't invoke variablewidget method. Rely instead on proper handling of the dbgStatus. (GDBController::parseBacktraceList): Don't trim frames in variables view. This will be done anyway on first currentFrame signal after program pause. (GDBController::parseLocals): Just emit parametersReady and localsReady. * variablewidget.h variablewidget.cpp: (VariableWidget::slotEvaluateExpression): New slot. (VariableTree::setLocalViewState, setCurrentThread): Remove. (VariableTree::produceVariablesInfo): New signal. (VariableWidget::VariableWidget): Create new "Eval" button. (VariableTree::slotDbgStatus): New slot. Trim everything when the program no longer exists, and set a flag immediately after restart. (VariableTree::slotCurrentFrame): New slot. Hide VarFrameRoot corresponding to the previous frame, show the one corresponding to the selected one, and populate it with variables if needed. * framestackwidget.h framestackwidget.cpp: (FramestackWidget::produceBacktrace): New signal. (FramestackWidget::getBacktrace): New method. (ThreadStackItem::setOpen): Only fetch backtrace when there are no children. Otherwise, when viewedThread_->setOpen(true) is called after parsing backtrace we immediately emit another signal. _______________________________________________ KDevelop-devel mailing list KDevelop-devel@barney.cs.uni-potsdam.de http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel --Boundary-00=_9QBqCGrUqAzuJmk--