equal
deleted
inserted
replaced
114 send: aGDBCommand wait: aBoolean |
114 send: aGDBCommand wait: aBoolean |
115 "Sends given command to GDB. If `aBoolean` is true, wait for |
115 "Sends given command to GDB. If `aBoolean` is true, wait for |
116 command to finish. Otherwise, return immediately." |
116 command to finish. Otherwise, return immediately." |
117 |
117 |
118 | token blocker releaser result | |
118 | token blocker releaser result | |
|
119 |
|
120 (aBoolean and:[Processor activeProcess == connection eventDispatchProcess]) ifTrue:[ |
|
121 self error: 'Cannot send commands from within event dispatching process. Would deadlock'. |
|
122 ]. |
119 |
123 |
120 token := self nextCommandSequnceNumber. |
124 token := self nextCommandSequnceNumber. |
121 aGDBCommand token: token. |
125 aGDBCommand token: token. |
122 ^ aBoolean ifTrue:[ |
126 ^ aBoolean ifTrue:[ |
123 releaser := [ :ev | |
127 releaser := [ :ev | |
135 connection pushEvent: (GDBCommandEvent new command: aGDBCommand). |
139 connection pushEvent: (GDBCommandEvent new command: aGDBCommand). |
136 nil. |
140 nil. |
137 ] |
141 ] |
138 |
142 |
139 "Created: / 02-06-2014 / 23:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
143 "Created: / 02-06-2014 / 23:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
140 "Modified: / 16-09-2014 / 23:44:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
144 "Modified: / 18-09-2014 / 00:14:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
141 ! ! |
145 ! ! |
142 |
146 |
143 !GDBDebugger methodsFor:'event handling'! |
147 !GDBDebugger methodsFor:'event handling'! |
144 |
148 |
145 onCommandEvent:aGDBCommandEvent |
149 onCommandEvent:aGDBCommandEvent |