--- a/GDBThread.st Thu Sep 18 23:09:57 2014 +0100
+++ b/GDBThread.st Mon Sep 22 09:59:28 2014 +0100
@@ -31,6 +31,10 @@
!GDBThread methodsFor:'accessing'!
+group
+ ^ group
+!
+
id
^ id
@@ -41,17 +45,20 @@
self ensureIsStopped.
stack isNil ifTrue:[
stack := GDBTransientDataHolder debugger: debugger factory:[
- | result depth |
+ | result depth frames |
result := debugger send: (GDBMI_stack_info_depth new arguments: { '--thread' . id . 100 }).
depth := result propertyAt: #depth.
result := debugger send: (GDBMI_stack_list_frames new arguments: { '--thread' . id . 0 . depth - 1 }).
- result propertyAt: #stack.
+ frames := result propertyAt: #stack.
+ frames do:[:each | each propertyAt: #thread put: self ].
+ frames
+
].
].
^ stack value
"Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 17-09-2014 / 22:12:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-09-2014 / 00:19:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
status
@@ -93,6 +100,22 @@
"Modified: / 07-09-2014 / 23:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!GDBThread methodsFor:'printing & storing'!
+
+printOn:aStream
+ "append a printed representation if the receiver to the argument, aStream"
+
+ aStream nextPutAll:'thread '.
+ id printOn:aStream.
+"/ aStream nextPutAll:'in group '.
+"/ group id printOn:aStream.
+ aStream nextPutAll:' ['.
+ status printOn:aStream.
+ aStream nextPutAll:']'.
+
+ "Modified: / 22-09-2014 / 00:59:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!GDBThread methodsFor:'private'!
ensureIsStopped
@@ -109,6 +132,12 @@
!GDBThread methodsFor:'testing'!
+isDead
+ ^ status isTerminated
+
+ "Created: / 22-09-2014 / 00:54:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
isRunning
^ status isRunning