212 |
212 |
213 onThreadSelectedEvent: aGDBThreadSelectedEvent |
213 onThreadSelectedEvent: aGDBThreadSelectedEvent |
214 | thread frame | |
214 | thread frame | |
215 |
215 |
216 thread := self threadWithId:aGDBThreadSelectedEvent threadId. |
216 thread := self threadWithId:aGDBThreadSelectedEvent threadId. |
|
217 frame := aGDBThreadSelectedEvent frame. |
|
218 |
217 aGDBThreadSelectedEvent setThread: thread. |
219 aGDBThreadSelectedEvent setThread: thread. |
218 "/ Be carefull, thread may be rinning!! |
220 "/ Be carefull, thread may be running!! |
219 (thread isStopped and:[(frame := aGDBThreadSelectedEvent frame) notNil]) ifTrue:[ |
221 (thread isStopped and:[frame notNil]) ifTrue:[ |
220 aGDBThreadSelectedEvent setFrame: (thread stack at: (frame level + 1)) |
222 aGDBThreadSelectedEvent setFrame: (thread stack at: (frame level + 1)) |
|
223 ] ifFalse:[ |
|
224 "/ If it is running, at least fixup it's frame, if there's any (it may not |
|
225 "/ if the thread is running at the time of =thread-select event. |
|
226 "/ Uff, so many cases... |
|
227 frame notNil ifTrue:[ |
|
228 frame |
|
229 setDebugger: debugger; |
|
230 setThread: thread. |
|
231 ]. |
221 ]. |
232 ]. |
222 |
233 |
223 "Created: / 29-07-2018 / 22:21:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
234 "Created: / 29-07-2018 / 22:21:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
224 "Modified: / 16-01-2019 / 23:25:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
235 "Modified: / 26-01-2019 / 23:35:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
225 ! ! |
236 ! ! |
226 |
237 |
227 !GDBThreadGroup methodsFor:'initialization'! |
238 !GDBThreadGroup methodsFor:'initialization'! |
228 |
239 |
229 initialize |
240 initialize |