VDBDebuggerApplication.st
changeset 36 60a0713ab8c3
parent 31 00f6de198c7f
child 37 f417fe8685c5
--- a/VDBDebuggerApplication.st	Fri Feb 27 13:19:41 2015 +0100
+++ b/VDBDebuggerApplication.st	Fri Feb 27 13:39:32 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'jv:vdb' }"
 
+"{ NameSpace: Smalltalk }"
+
 VDBAbstractApplication subclass:#VDBDebuggerApplication
 	instanceVariableNames:'layoutSpecHolder selectedInferiorHolder selectedThreadHolder
 		selectedFrameHolder containerBottom'
@@ -554,6 +556,34 @@
     "Created: / 10-06-2014 / 17:29:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!VDBDebuggerApplication methodsFor:'change & update'!
+
+update:aspect with:parameter from:sender
+    "Invoked when an object that I depend upon sends a change notification."
+
+    "stub code automatically generated - please change as required"
+
+    sender == selectedFrameHolder ifTrue:[ 
+        self updateAfterSelectedFrameHolderChanged.
+    ].
+
+    super update:aspect with:parameter from:sender
+
+    "Modified: / 27-02-2015 / 13:24:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+updateAfterSelectedFrameHolderChanged
+    | frame |
+
+    frame := selectedFrameHolder value.
+    frame notNil ifTrue:[ 
+        debugger send: (GDBMI_thread_select  new arguments:(Array with: frame thread id)) wait: false.  
+        debugger send: (GDBMI_stack_select_frame  new arguments:(Array with: frame level)) wait: false.  
+    ].
+
+    "Created: / 27-02-2015 / 13:24:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !VDBDebuggerApplication methodsFor:'event handling'!
 
 onRunningEvent: aGDBStoppedEvent