Pass MI trace in the exit event
This allows users to inspect the trace when GDB terminates
abnormally (i.e., crashes).
--- a/GDBConnection.st Wed May 23 10:22:36 2018 +0100
+++ b/GDBConnection.st Mon May 28 23:18:45 2018 +0100
@@ -384,7 +384,7 @@
!
released: status
- self pushEvent: (GDBExitEvent new setStatus: status; yourself).
+ self pushEvent: (GDBExitEvent new setStatus: status; setTrace: recorder; yourself).
status success ifFalse:[
Logger log: ('gdb process: exited with status %1 code %2' bindWith: status status with: status code) severity: #error facility: 'GDB'.
].
@@ -398,7 +398,7 @@
inferiorPTY release.
"Created: / 26-05-2014 / 21:31:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 04-02-2018 / 20:29:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 28-05-2018 / 22:59:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!GDBConnection class methodsFor:'documentation'!
--- a/GDBExitEvent.st Wed May 23 10:22:36 2018 +0100
+++ b/GDBExitEvent.st Mon May 28 23:18:45 2018 +0100
@@ -21,7 +21,7 @@
"{ NameSpace: Smalltalk }"
GDBInternalEvent subclass:#GDBExitEvent
- instanceVariableNames:'status'
+ instanceVariableNames:'status trace'
classVariableNames:''
poolDictionaries:''
category:'GDB-Core-Events'
@@ -58,6 +58,10 @@
^ status
"Modified (comment): / 04-02-2018 / 20:24:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+trace
+ ^ trace
! !
!GDBExitEvent methodsFor:'initialization'!
@@ -66,5 +70,11 @@
status := anOSProcessStatus
"Created: / 04-02-2018 / 20:22:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+setTrace: GDBMITrace
+ trace:= GDBMITrace
+
+ "Created: / 28-05-2018 / 22:58:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !