equal
deleted
inserted
replaced
37 "Created: / 07-09-2014 / 22:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
37 "Created: / 07-09-2014 / 22:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
38 ! |
38 ! |
39 |
39 |
40 stack |
40 stack |
41 self ensureIsStopped. |
41 self ensureIsStopped. |
42 stack isNil ifTrue:[ |
42 stack isNil ifTrue:[ |
43 stack := GDBStack newWithThread: self. |
43 | result depth | |
|
44 result := debugger send: (GDBMI_stack_info_depth new arguments: { '--thread' . id . 100 }). |
|
45 depth := result propertyAt: #depth. |
|
46 result := debugger send: (GDBMI_stack_list_frames new arguments: { '--thread' . id . 0 . depth - 1 }). |
|
47 stack := result propertyAt: #stack. |
44 ]. |
48 ]. |
45 ^ stack |
49 ^ stack |
46 |
50 |
47 "Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
51 "Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
52 "Modified: / 17-09-2014 / 00:02:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
48 ! |
53 ! |
49 |
54 |
50 status |
55 status |
51 ^ status |
56 ^ status |
52 ! ! |
57 ! ! |
87 ! ! |
92 ! ! |
88 |
93 |
89 !GDBThread methodsFor:'private'! |
94 !GDBThread methodsFor:'private'! |
90 |
95 |
91 ensureIsStopped |
96 ensureIsStopped |
92 self isStopped ifTrue:[ |
97 self isStopped ifFalse:[ |
93 (GDBInvalidObject newException) |
98 (GDBInvalidObject newException) |
94 parameter:self; |
99 parameter:self; |
95 messageText:'Invalid state (thread is running or already dead)'; |
100 messageText:'Invalid state (thread is running or already dead)'; |
96 raise. |
101 raise. |
97 ]. |
102 ]. |
98 |
103 |
99 "Created: / 09-09-2014 / 00:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
104 "Created: / 09-09-2014 / 00:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
105 "Modified: / 16-09-2014 / 23:51:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
100 ! ! |
106 ! ! |
101 |
107 |
102 !GDBThread methodsFor:'testing'! |
108 !GDBThread methodsFor:'testing'! |
103 |
109 |
104 isRunning |
110 isRunning |