equal
deleted
inserted
replaced
6 instanceVariableNames:'source lookahead token token2CommandMappingBlock recorder' |
6 instanceVariableNames:'source lookahead token token2CommandMappingBlock recorder' |
7 classVariableNames:'' |
7 classVariableNames:'' |
8 poolDictionaries:'GDBCommandStatus' |
8 poolDictionaries:'GDBCommandStatus' |
9 category:'GDB-Private' |
9 category:'GDB-Private' |
10 ! |
10 ! |
|
11 |
11 |
12 |
12 !GDBMIParser class methodsFor:'instance creation'! |
13 !GDBMIParser class methodsFor:'instance creation'! |
13 |
14 |
14 on: aStringOrStream |
15 on: aStringOrStream |
15 ^ self new on: aStringOrStream |
16 ^ self new on: aStringOrStream |
217 ]. |
218 ]. |
218 peek isDigit ifTrue:[ self parseToken. peek := self peek ]. |
219 peek isDigit ifTrue:[ self parseToken. peek := self peek ]. |
219 peek ~~ $( |
220 peek ~~ $( |
220 ] whileTrue:[ |
221 ] whileTrue:[ |
221 ('*+=' includes: self peek) ifTrue:[ |
222 ('*+=' includes: self peek) ifTrue:[ |
222 events add: self parseAsyncRecord. |
223 | event | |
|
224 |
|
225 event := self parseAsyncRecord. |
|
226 events add: event. |
|
227 "Sigh, GDB 7.7.1 does not write '(gdb)' terminator after an |
|
228 async execution events (even though specification says it should). |
|
229 Thus, report any execution record immediately" |
|
230 event isExecutionEvent ifTrue:[ |
|
231 events last token: token. |
|
232 recorder notNil ifTrue:[ |
|
233 recorder recordResponseEnd. |
|
234 ]. |
|
235 ^ events |
|
236 ]. |
223 ] ifFalse:[ |
237 ] ifFalse:[ |
224 ('~@&' includes: self peek) ifTrue:[ |
238 ('~@&' includes: self peek) ifTrue:[ |
225 events add: self parseStreamRecord. |
239 events add: self parseStreamRecord. |
226 ] ifFalse:[ |
240 ] ifFalse:[ |
227 peek == $^ ifTrue:[ |
241 peek == $^ ifTrue:[ |
240 recorder recordResponseEnd. |
254 recorder recordResponseEnd. |
241 ]. |
255 ]. |
242 ^ events |
256 ^ events |
243 |
257 |
244 "Created: / 30-05-2014 / 09:52:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
258 "Created: / 30-05-2014 / 09:52:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
245 "Modified: / 06-09-2014 / 00:44:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
259 "Modified: / 01-10-2014 / 09:36:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
246 ! |
260 ! |
247 |
261 |
248 parseResultClass |
262 parseResultClass |
249 " |
263 " |
250 result-class → 'done' | 'running' | 'connected' | 'error' | 'exit' |
264 result-class → 'done' | 'running' | 'connected' | 'error' | 'exit' |
880 |
894 |
881 "Created: / 19-11-2012 / 20:05:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
895 "Created: / 19-11-2012 / 20:05:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
882 "Modified: / 24-06-2014 / 23:31:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
896 "Modified: / 24-06-2014 / 23:31:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
883 ! ! |
897 ! ! |
884 |
898 |
|
899 !GDBMIParser class methodsFor:'documentation'! |
|
900 |
|
901 version_HG |
|
902 |
|
903 ^ '$Changeset: <not expanded> $' |
|
904 ! ! |
|
905 |