GDBThreadGroup.st
changeset 144 342b6dfe3a6f
parent 129 661e16236c67
child 168 822cd61a882e
--- a/GDBThreadGroup.st	Wed Sep 26 13:25:40 2018 +0100
+++ b/GDBThreadGroup.st	Wed Sep 26 11:16:56 2018 +0100
@@ -23,7 +23,7 @@
 "{ NameSpace: Smalltalk }"
 
 GDBDebuggerObject subclass:#GDBThreadGroup
-	instanceVariableNames:'id type executable running pid exit_code threads'
+	instanceVariableNames:'id type executable running pid exit_code threads registersMap'
 	classVariableNames:'ExecutableSentinel'
 	poolDictionaries:'GDBCommandStatus'
 	category:'GDB-Core'
@@ -227,8 +227,19 @@
     "Invoked when a new instance is created."
 
     running := false.
+    registersMap := Dictionary new.
 
-    "Modified: / 06-06-2017 / 00:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 26-09-2018 / 09:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+reset
+    "Reset all internal caches. Invoked bu debugger when an inferior
+     starts. This is necessary since GDB recycles inferors and so we
+     do."
+
+    registersMap := Dictionary new.
+
+    "Created: / 26-09-2018 / 10:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 setExitCode: anInteger
@@ -273,6 +284,12 @@
 
 !GDBThreadGroup methodsFor:'private'!
 
+registersMap
+    ^ registersMap
+
+    "Created: / 26-09-2018 / 10:01:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 threadAdd: aGDBThread
     self threads add: aGDBThread