--- a/GDBThread.st Tue Jul 11 23:37:04 2017 +0200
+++ b/GDBThread.st Wed Jul 12 16:27:29 2017 +0200
@@ -3,7 +3,7 @@
"{ NameSpace: Smalltalk }"
GDBDebuggerObject subclass:#GDBThread
- instanceVariableNames:'id group info stack'
+ instanceVariableNames:'id group status info stack'
classVariableNames:''
poolDictionaries:''
category:'GDB-Core'
@@ -73,9 +73,12 @@
!
status
- ^ self info state
+ status isUnknown ifTrue:[
+ status := self info state
+ ].
+ ^ status
- "Modified: / 08-03-2015 / 09:10:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 12-07-2017 / 13:36:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
targetId
@@ -113,6 +116,22 @@
"Created: / 10-03-2015 / 00:32:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!GDBThread methodsFor:'event handling'!
+
+onRunningEvent: aGDBRunningEvent
+ self assert: (aGDBRunningEvent threads includesIdentical: self).
+ status := GDBThreadStateRunning theOneAndOnlyInstance.
+
+ "Created: / 12-07-2017 / 13:50:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onStoppedEvent: aGDBStoppedEvent
+ self assert: (aGDBStoppedEvent threads includesIdentical: self).
+ status := GDBThreadStateStopped theOneAndOnlyInstance.
+
+ "Created: / 12-07-2017 / 13:50:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!GDBThread methodsFor:'initialization'!
setGroup: aGDBThreadGroup
@@ -130,6 +149,12 @@
"Modified: / 08-03-2015 / 09:08:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+setStatus: aGDBThreadState
+ status := aGDBThreadState
+
+ "Created: / 12-07-2017 / 13:43:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
setTerminated
"Created: / 07-09-2014 / 21:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"