More work on basic example. GDB exiting not yet working.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 03 Jun 2014 01:05:03 +0100
changeset 8 7f4882e2562a
parent 7 7a51f98e7162
child 9 5cc8797f6523
More work on basic example. GDB exiting not yet working.
GDB.st
GDBDriver.st
GDBExitEvent.st
GDBInternalEvent.st
GDBParser.st
GDBStreamOutputEvent.st
Make.proto
Make.spec
abbrev.stc
bc.mak
jv_libgdbs.st
libInit.cc
libgdbs.rc
tests/GDBParserTests.st
tests/tests.rc
--- a/GDB.st	Mon Jun 02 23:56:27 2014 +0100
+++ b/GDB.st	Tue Jun 03 01:05:03 2014 +0100
@@ -46,6 +46,12 @@
 
 !GDB methodsFor:'commands'!
 
+send: aGDBCommand
+    ^ self send: aGDBCommand wait: true.
+
+    "Created: / 03-06-2014 / 00:10:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 send: aGDBCommand wait: aBoolean
     "Sends given command to GDB. If `aBoolean` is true, wait for
      command to finish. Otherwise, return immediately."
@@ -75,10 +81,16 @@
 
 onCommandResult: aGDBCommandResultEvent
     aGDBCommandResultEvent status == CommandStatusExit ifTrue:[ 
-        self release.
+        driver pushEvent: GDBExitEvent new.
     ].
 
     "Created: / 02-06-2014 / 23:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+onExit: aGDBExitEvent
+    self release.
+
+    "Created: / 03-06-2014 / 00:36:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !GDB methodsFor:'finalization'!
@@ -99,10 +111,14 @@
     snapshotSequenceNumber := 0.
 
     self announcer
-        when: GDBCommandResultEvent     send: #onCommandResult: to: self.
+        when: GDBCommandResultEvent     send: #onCommandResult: to: self;
+        when: GDBExitEvent              send: #onExit: to: self.
+
+    driver eventPumpStart.
+    driver eventDispatchStart.
 
     "Created: / 26-05-2014 / 21:23:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-06-2014 / 23:47:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:35:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 release
--- a/GDBDriver.st	Mon Jun 02 23:56:27 2014 +0100
+++ b/GDBDriver.st	Tue Jun 03 01:05:03 2014 +0100
@@ -31,7 +31,7 @@
 eventDispatchLoop
     "raise an error: this method should be implemented (TODO)"
 
-    [  
+    [ pid notNil ] whileTrue:[  
         | eventQueueEmpty |
 
 
@@ -48,22 +48,28 @@
                 ]
             ].
             eventQueueEmpty ifFalse:[
-                self eventDispatchSingle: event.
+                [
+                    self eventDispatchSingle: event.
+                ] on: Error do:[:ex | 
+                    "/ Pass
+                ].
             ].
         ].
         eventQueueNotifier wait.
-    ] loop.
+    ]
 
     "Created: / 02-06-2014 / 22:51:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:44:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 eventDispatchSingle: aGDBEvent
     TraceEvents ifTrue:[ 
-        Logger log: ('Announcing: %1' bindWith: aGDBEvent) severity: #trace facility: 'GDB' originator: self attachment: aGDBEvent
+        Logger log: ('Announcing: %1' bindWith: aGDBEvent class name) severity: #trace facility: 'GDB'
     ].
     eventAnnouncer announce: aGDBEvent
 
     "Created: / 02-06-2014 / 22:58:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:12:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 eventDispatchStart
@@ -74,9 +80,11 @@
         eventDispatchProcess name:('GDB Event dispatcher (%1)' bindWith:pid).
         eventDispatchProcess priority:Processor userBackgroundPriority.
         eventDispatchProcess addExitAction:[ eventDispatchProcess := nil. ].
+        eventDispatchProcess resume.
     ].
 
     "Created: / 02-06-2014 / 22:51:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 02-06-2014 / 23:58:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 eventDispatchStop
@@ -100,9 +108,9 @@
 
     command := aGDBCommandEvent command.
     command token notNil ifTrue:[ 
-        output nextPutLine: command token printString.
+        input nextPutAll: command token printString.
     ].
-    output nextPutLine: command asString.
+    input nextPutLine: command asString.
 
     "Created: / 02-06-2014 / 23:38:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
@@ -116,11 +124,36 @@
     [ output atEnd ] whileFalse:[ 
         | eventset |
 
-        eventset := parser parseOutput.
-        self pushEventSet: eventset.
+        [
+            [ 
+                eventset := parser parseOutput.
+            ] on: StreamNotOpenError do:[
+                ^ self.
+            ].
+            self pushEventSet: eventset.
+        ] on: AbortOperationRequest do:[
+            | terminator i c |
+
+            terminator := '(gdb)'.
+            i := 1.
+            output notNil ifTrue:[
+                [ output atEnd not and: [i <= terminator size ] ] whileTrue:[ 
+                    c := output next.
+                    c == (terminator at: i) ifTrue:[ 
+                        i := i + 1.
+                    ] ifFalse:[ 
+                        i := 1.
+                    ].
+                ].
+                output next. "/ read nl.
+            ] ifFalse:[ 
+                ^ self.
+            ].
+        ]
     ]
 
     "Created: / 02-06-2014 / 22:38:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:54:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 eventPumpStart
@@ -131,9 +164,11 @@
         eventPumpProcess name:('GDB Event pump (%1)' bindWith:pid).
         eventPumpProcess priority:Processor userBackgroundPriority.
         eventPumpProcess addExitAction:[ eventPumpProcess := nil. ].
+        eventPumpProcess resume.
     ].
 
     "Created: / 02-06-2014 / 22:38:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 02-06-2014 / 23:58:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 eventPumpStop
@@ -190,20 +225,15 @@
 
 release
     pid notNil ifTrue:[
-        self eventPumpStop.
-        self eventDispatchStop.
         OperatingSystem sendSignal:(OperatingSystem sigKILL) to:pid.       
     ]
 
     "Created: / 26-05-2014 / 21:30:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-06-2014 / 23:41:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:55:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 released: status
     pid := nil.
-    self eventPumpStop.
-    self eventDispatchStop.    
-
     input notNil ifTrue:[ 
         input close.
         input := nil.
@@ -214,7 +244,7 @@
     ].
 
     "Created: / 26-05-2014 / 21:31:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-06-2014 / 23:42:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !GDBDriver class methodsFor:'documentation'!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GDBExitEvent.st	Tue Jun 03 01:05:03 2014 +0100
@@ -0,0 +1,9 @@
+"{ Package: 'jv:libgdbs' }"
+
+GDBInternalEvent subclass:#GDBExitEvent
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'GDB-Core-Events'
+!
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GDBInternalEvent.st	Tue Jun 03 01:05:03 2014 +0100
@@ -0,0 +1,27 @@
+"{ Package: 'jv:libgdbs' }"
+
+GDBEvent subclass:#GDBInternalEvent
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'GDB-Core-Events'
+!
+
+
+!GDBInternalEvent class methodsFor:'queries'!
+
+isAbstract
+    "Return if this class is an abstract class.
+     True is returned here for myself only; false for subclasses.
+     Abstract subclasses must redefine again."
+
+    ^ self == GDBInternalEvent.
+! !
+
+!GDBInternalEvent class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/GDBParser.st	Mon Jun 02 23:56:27 2014 +0100
+++ b/GDBParser.st	Tue Jun 03 01:05:03 2014 +0100
@@ -170,6 +170,11 @@
     | peek events |
 
     events := GDBEventSet new.
+
+    peek := self peek.
+    peek == Character space ifTrue:[ self next ].
+    peek := self peek.
+    peek == Character cr ifTrue:[ self next ].
     [
         peek := self peek.
         peek isDigit ifTrue:[ self parseToken. peek := self peek ].
@@ -188,13 +193,14 @@
                 ].
             ].
         ].
+        events last token: token.
     ].
     self expect: '(gdb)'.
     self parseNl.
     ^ events
 
     "Created: / 30-05-2014 / 09:52:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-06-2014 / 22:21:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:50:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 parseResultClass
@@ -256,8 +262,13 @@
 !
 
 parseToken
+    token := 0.
+    [ self peek isDigit ] whileTrue:[ 
+        token := (token * 10) + (self next codePoint - $0 codePoint).
+    ].
 
     "Created: / 28-05-2014 / 00:14:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:49:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !GDBParser methodsFor:'parsing-async events'!
--- a/GDBStreamOutputEvent.st	Mon Jun 02 23:56:27 2014 +0100
+++ b/GDBStreamOutputEvent.st	Tue Jun 03 01:05:03 2014 +0100
@@ -32,9 +32,9 @@
 
     super printOn:aStream.
     aStream nextPut:$(.
-    value storeOn:aStream.
+    value printOn:aStream.
     aStream nextPut:$).
 
-    "Modified: / 01-06-2014 / 23:55:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/Make.proto	Mon Jun 02 23:56:27 2014 +0100
+++ b/Make.proto	Tue Jun 03 01:05:03 2014 +0100
@@ -138,11 +138,13 @@
 $(OUTDIR)GDBCommandEvent.$(O) GDBCommandEvent.$(H): GDBCommandEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBCommandResultEvent.$(O) GDBCommandResultEvent.$(H): GDBCommandResultEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBDriver.$(O) GDBDriver.$(H): GDBDriver.st $(INCLUDE_TOP)/jv/libgdbs/GDBDebugFlags.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)GDBInternalEvent.$(O) GDBInternalEvent.$(H): GDBInternalEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBParser.$(O) GDBParser.$(H): GDBParser.st $(INCLUDE_TOP)/jv/libgdbs/GDBCommandStatus.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBStreamOutputEvent.$(O) GDBStreamOutputEvent.$(H): GDBStreamOutputEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBTuple.$(O) GDBTuple.$(H): GDBTuple.st $(INCLUDE_TOP)/jv/libgdbs/GDBObject.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBConsoleOutputEvent.$(O) GDBConsoleOutputEvent.$(H): GDBConsoleOutputEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBStreamOutputEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBExecutionEvent.$(O) GDBExecutionEvent.$(H): GDBExecutionEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)GDBExitEvent.$(O) GDBExitEvent.$(H): GDBExitEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBInternalEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBLogOutputEvent.$(O) GDBLogOutputEvent.$(H): GDBLogOutputEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBStreamOutputEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBNotificationEvent.$(O) GDBNotificationEvent.$(H): GDBNotificationEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)GDBStatusEvent.$(O) GDBStatusEvent.$(H): GDBStatusEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Make.spec	Mon Jun 02 23:56:27 2014 +0100
+++ b/Make.spec	Tue Jun 03 01:05:03 2014 +0100
@@ -66,11 +66,13 @@
 	GDBCommandEvent \
 	GDBCommandResultEvent \
 	GDBDriver \
+	GDBInternalEvent \
 	GDBParser \
 	GDBStreamOutputEvent \
 	GDBTuple \
 	GDBConsoleOutputEvent \
 	GDBExecutionEvent \
+	GDBExitEvent \
 	GDBLogOutputEvent \
 	GDBNotificationEvent \
 	GDBStatusEvent \
@@ -96,11 +98,13 @@
     $(OUTDIR_SLASH)GDBCommandEvent.$(O) \
     $(OUTDIR_SLASH)GDBCommandResultEvent.$(O) \
     $(OUTDIR_SLASH)GDBDriver.$(O) \
+    $(OUTDIR_SLASH)GDBInternalEvent.$(O) \
     $(OUTDIR_SLASH)GDBParser.$(O) \
     $(OUTDIR_SLASH)GDBStreamOutputEvent.$(O) \
     $(OUTDIR_SLASH)GDBTuple.$(O) \
     $(OUTDIR_SLASH)GDBConsoleOutputEvent.$(O) \
     $(OUTDIR_SLASH)GDBExecutionEvent.$(O) \
+    $(OUTDIR_SLASH)GDBExitEvent.$(O) \
     $(OUTDIR_SLASH)GDBLogOutputEvent.$(O) \
     $(OUTDIR_SLASH)GDBNotificationEvent.$(O) \
     $(OUTDIR_SLASH)GDBStatusEvent.$(O) \
--- a/abbrev.stc	Mon Jun 02 23:56:27 2014 +0100
+++ b/abbrev.stc	Tue Jun 03 01:05:03 2014 +0100
@@ -17,11 +17,13 @@
 GDBCommandEvent GDBCommandEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBCommandResultEvent GDBCommandResultEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBDriver GDBDriver jv:libgdbs 'GDB-Private' 0
+GDBInternalEvent GDBInternalEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBParser GDBParser jv:libgdbs 'GDB-Private' 0
 GDBStreamOutputEvent GDBStreamOutputEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBTuple GDBTuple jv:libgdbs 'GDB-Core' 0
 GDBConsoleOutputEvent GDBConsoleOutputEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBExecutionEvent GDBExecutionEvent jv:libgdbs 'GDB-Core-Events' 0
+GDBExitEvent GDBExitEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBLogOutputEvent GDBLogOutputEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBNotificationEvent GDBNotificationEvent jv:libgdbs 'GDB-Core-Events' 0
 GDBStatusEvent GDBStatusEvent jv:libgdbs 'GDB-Core-Events' 0
--- a/bc.mak	Mon Jun 02 23:56:27 2014 +0100
+++ b/bc.mak	Tue Jun 03 01:05:03 2014 +0100
@@ -84,11 +84,13 @@
 $(OUTDIR)GDBCommandEvent.$(O) GDBCommandEvent.$(H): GDBCommandEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBCommandResultEvent.$(O) GDBCommandResultEvent.$(H): GDBCommandResultEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBDriver.$(O) GDBDriver.$(H): GDBDriver.st $(INCLUDE_TOP)\jv\libgdbs\GDBDebugFlags.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)GDBInternalEvent.$(O) GDBInternalEvent.$(H): GDBInternalEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBParser.$(O) GDBParser.$(H): GDBParser.st $(INCLUDE_TOP)\jv\libgdbs\GDBCommandStatus.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBStreamOutputEvent.$(O) GDBStreamOutputEvent.$(H): GDBStreamOutputEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBTuple.$(O) GDBTuple.$(H): GDBTuple.st $(INCLUDE_TOP)\jv\libgdbs\GDBObject.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBConsoleOutputEvent.$(O) GDBConsoleOutputEvent.$(H): GDBConsoleOutputEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBStreamOutputEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBExecutionEvent.$(O) GDBExecutionEvent.$(H): GDBExecutionEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)GDBExitEvent.$(O) GDBExitEvent.$(H): GDBExitEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBInternalEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBLogOutputEvent.$(O) GDBLogOutputEvent.$(H): GDBLogOutputEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBStreamOutputEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBNotificationEvent.$(O) GDBNotificationEvent.$(H): GDBNotificationEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)GDBStatusEvent.$(O) GDBStatusEvent.$(H): GDBStatusEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/jv_libgdbs.st	Mon Jun 02 23:56:27 2014 +0100
+++ b/jv_libgdbs.st	Tue Jun 03 01:05:03 2014 +0100
@@ -81,11 +81,13 @@
         GDBCommandEvent
         GDBCommandResultEvent
         GDBDriver
+        GDBInternalEvent
         GDBParser
         GDBStreamOutputEvent
         GDBTuple
         GDBConsoleOutputEvent
         GDBExecutionEvent
+        GDBExitEvent
         GDBLogOutputEvent
         GDBNotificationEvent
         GDBStatusEvent
--- a/libInit.cc	Mon Jun 02 23:56:27 2014 +0100
+++ b/libInit.cc	Tue Jun 03 01:05:03 2014 +0100
@@ -43,11 +43,13 @@
 _GDBCommandEvent_Init(pass,__pRT__,snd);
 _GDBCommandResultEvent_Init(pass,__pRT__,snd);
 _GDBDriver_Init(pass,__pRT__,snd);
+_GDBInternalEvent_Init(pass,__pRT__,snd);
 _GDBParser_Init(pass,__pRT__,snd);
 _GDBStreamOutputEvent_Init(pass,__pRT__,snd);
 _GDBTuple_Init(pass,__pRT__,snd);
 _GDBConsoleOutputEvent_Init(pass,__pRT__,snd);
 _GDBExecutionEvent_Init(pass,__pRT__,snd);
+_GDBExitEvent_Init(pass,__pRT__,snd);
 _GDBLogOutputEvent_Init(pass,__pRT__,snd);
 _GDBNotificationEvent_Init(pass,__pRT__,snd);
 _GDBStatusEvent_Init(pass,__pRT__,snd);
--- a/libgdbs.rc	Mon Jun 02 23:56:27 2014 +0100
+++ b/libgdbs.rc	Tue Jun 03 01:05:03 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "LibraryName\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Mon, 02 Jun 2014 22:55:58 GMT\0"
+      VALUE "ProductDate", "Mon, 02 Jun 2014 23:59:20 GMT\0"
     END
 
   END
--- a/tests/GDBParserTests.st	Mon Jun 02 23:56:27 2014 +0100
+++ b/tests/GDBParserTests.st	Tue Jun 03 01:05:03 2014 +0100
@@ -19,8 +19,12 @@
 lo'.  
     self assert: (GDBParser on: '"X\xE1X" xxx') parseCString = 'XáX'.
 
+    self assert: (GDBParser on: '"warning: File \"/home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/stx/.gdbinit\" auto-loading has been declined by your `auto-load safe-path'' set to \"$debugdir:$datadir/auto-load\".\n"')
+        parseCString = 'warning: File "/home/jv/Private/Projects/SmalltalkX/sources/branches/jv1/build/stx/.gdbinit" auto-loading has been declined by your `auto-load safe-path'' set to "$debugdir:$datadir/auto-load".
+'.
+
     "Created: / 28-05-2014 / 00:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 02-06-2014 / 23:04:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-06-2014 / 00:23:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !GDBParserTests methodsFor:'tests - examples'!
@@ -45,6 +49,24 @@
     "Modified: / 02-06-2014 / 23:04:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+test_simple_example_02
+
+    | parser events |
+
+    parser := GDBParser on:
+'1234^done
+(gdb)
+'.
+    events := parser parseOutput.
+
+    self assert: events size == 1.
+    self assert: events first isCommandResultEvent.
+    self assert: events first result status == CommandStatusDone.
+    self assert: events first token == 1234
+
+    "Created: / 03-06-2014 / 00:50:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_simple_session_01
 
     | parser events |
--- a/tests/tests.rc	Mon Jun 02 23:56:27 2014 +0100
+++ b/tests/tests.rc	Tue Jun 03 01:05:03 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "LibraryName\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Mon, 02 Jun 2014 22:56:00 GMT\0"
+      VALUE "ProductDate", "Mon, 02 Jun 2014 23:59:22 GMT\0"
     END
 
   END