author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 23 Sep 2014 23:48:13 +0100 | |
changeset 45 | deb908479a37 |
parent 43 | 22236b6d1d9a |
child 51 | 2fa20404923c |
permissions | -rw-r--r-- |
35
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
1 |
"{ Package: 'jv:libgdbs' }" |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
2 |
|
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
3 |
GDBDebuggerObject subclass:#GDBThread |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
4 |
instanceVariableNames:'id group status stack' |
35
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
classVariableNames:'' |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
poolDictionaries:'' |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
category:'GDB-Core' |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
8 |
! |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
|
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
10 |
!GDBThread class methodsFor:'instance creation'! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
11 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
12 |
newWithDebugger: debugger id: id group: group |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
13 |
^ self new |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
14 |
setDebugger: debugger; |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
15 |
setId: id; |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
16 |
setGroup: group; |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
17 |
yourself. |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
18 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
19 |
"Created: / 07-09-2014 / 21:33:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
20 |
! ! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
21 |
|
35
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
!GDBThread class methodsFor:'accessing - GDB value descriptors'! |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
|
45
deb908479a37
Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
43
diff
changeset
|
24 |
description |
deb908479a37
Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
43
diff
changeset
|
25 |
^ (super description) |
deb908479a37
Code refactored to use Magritte to meta-describe GDB objects.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
43
diff
changeset
|
26 |
define:#id as:Integer; |
35
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
yourself |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
|
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
29 |
"Created: / 06-09-2014 / 02:21:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
30 |
! ! |
c17ecf90e446
Initial support for thread groups, threads and breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
|
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
32 |
!GDBThread methodsFor:'accessing'! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
33 |
|
43
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
34 |
group |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
35 |
^ group |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
36 |
! |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
37 |
|
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
38 |
id |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
39 |
^ id |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
40 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
41 |
"Created: / 07-09-2014 / 22:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
42 |
! |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
43 |
|
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
44 |
stack |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
45 |
self ensureIsStopped. |
40
0ce76b671515
Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
39
diff
changeset
|
46 |
stack isNil ifTrue:[ |
41
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
47 |
stack := GDBTransientDataHolder debugger: debugger factory:[ |
43
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
48 |
| result depth frames | |
41
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
49 |
result := debugger send: (GDBMI_stack_info_depth new arguments: { '--thread' . id . 100 }). |
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
50 |
depth := result propertyAt: #depth. |
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
51 |
result := debugger send: (GDBMI_stack_list_frames new arguments: { '--thread' . id . 0 . depth - 1 }). |
43
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
52 |
frames := result propertyAt: #stack. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
53 |
frames do:[:each | each propertyAt: #thread put: self ]. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
54 |
frames |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
55 |
|
41
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
56 |
]. |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
57 |
]. |
41
fb48207b6104
Fixes in thread's stack mangement. Dispatch events to applications using their UI event loop.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
40
diff
changeset
|
58 |
^ stack value |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
59 |
|
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
60 |
"Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
43
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
61 |
"Modified: / 22-09-2014 / 00:19:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
62 |
! |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
63 |
|
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
64 |
status |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
65 |
^ status |
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
66 |
! ! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
67 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
68 |
!GDBThread methodsFor:'initialization'! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
69 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
70 |
setGroup: aGDBThreadGroup |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
71 |
self assert: group isNil. |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
72 |
group := aGDBThreadGroup. |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
73 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
74 |
"Created: / 07-09-2014 / 21:32:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
75 |
! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
76 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
77 |
setId: tid |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
78 |
self assert: id isNil. |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
79 |
id := tid. |
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
80 |
status := GDBThreadStatusRunning theOneAndOnlyInstance |
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
81 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
82 |
"Created: / 07-09-2014 / 21:31:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
83 |
"Modified: / 07-09-2014 / 23:27:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
84 |
! |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
85 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
86 |
setStatus: aGDBThreadStatus |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
87 |
status := aGDBThreadStatus. |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
88 |
status isStopped ifFalse:[ |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
89 |
stack := nil. |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
90 |
]. |
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
91 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
92 |
"Created: / 07-09-2014 / 23:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
93 |
"Modified: / 09-09-2014 / 00:04:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
94 |
! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
95 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
96 |
setTerminated |
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
97 |
status := GDBThreadStatusTerminated theOneAndOnlyInstance |
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
98 |
|
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
99 |
"Created: / 07-09-2014 / 21:37:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
100 |
"Modified: / 07-09-2014 / 23:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
36
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
101 |
! ! |
095c4b0b74d3
Added support for threads.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
35
diff
changeset
|
102 |
|
43
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
103 |
!GDBThread methodsFor:'printing & storing'! |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
104 |
|
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
105 |
printOn:aStream |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
106 |
"append a printed representation if the receiver to the argument, aStream" |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
107 |
|
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
108 |
aStream nextPutAll:'thread '. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
109 |
id printOn:aStream. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
110 |
"/ aStream nextPutAll:'in group '. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
111 |
"/ group id printOn:aStream. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
112 |
aStream nextPutAll:' ['. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
113 |
status printOn:aStream. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
114 |
aStream nextPutAll:']'. |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
115 |
|
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
116 |
"Modified: / 22-09-2014 / 00:59:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
117 |
! ! |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
118 |
|
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
119 |
!GDBThread methodsFor:'private'! |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
120 |
|
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
121 |
ensureIsStopped |
40
0ce76b671515
Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
39
diff
changeset
|
122 |
self isStopped ifFalse:[ |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
123 |
(GDBInvalidObject newException) |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
124 |
parameter:self; |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
125 |
messageText:'Invalid state (thread is running or already dead)'; |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
126 |
raise. |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
127 |
]. |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
128 |
|
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
129 |
"Created: / 09-09-2014 / 00:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
40
0ce76b671515
Some more support for stack frames.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
39
diff
changeset
|
130 |
"Modified: / 16-09-2014 / 23:51:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
131 |
! ! |
2b9d2f75906f
Some work on execution stack model
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
37
diff
changeset
|
132 |
|
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
133 |
!GDBThread methodsFor:'testing'! |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
134 |
|
43
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
135 |
isDead |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
136 |
^ status isTerminated |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
137 |
|
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
138 |
"Created: / 22-09-2014 / 00:54:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
139 |
! |
22236b6d1d9a
Remove threads from thread group when threadgroup terminates.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
41
diff
changeset
|
140 |
|
37
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
141 |
isRunning |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
142 |
^ status isRunning |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
143 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
144 |
"Created: / 07-09-2014 / 23:23:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
145 |
! |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
146 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
147 |
isStopped |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
148 |
^ status isStopped |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
149 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
150 |
"Created: / 07-09-2014 / 23:23:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
151 |
! |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
152 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
153 |
isTerminated |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
154 |
^ status isTerminated |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
155 |
|
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
156 |
"Created: / 07-09-2014 / 23:23:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
157 |
! ! |
a85f0c91f164
Some more work on threads (thread status)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
36
diff
changeset
|
158 |