--- a/GDBConnection.st Mon Sep 08 23:56:17 2014 +0100
+++ b/GDBConnection.st Tue Sep 09 12:44:37 2014 +0100
@@ -38,6 +38,14 @@
inferiorPTY
^ inferiorPTY
+!
+
+recorder
+ ^ recorder
+!
+
+recorder:aGDBSessionRecorder
+ recorder := aGDBSessionRecorder.
! !
!GDBConnection methodsFor:'commands'!
--- a/GDBDebuggerObject.st Mon Sep 08 23:56:17 2014 +0100
+++ b/GDBDebuggerObject.st Tue Sep 09 12:44:37 2014 +0100
@@ -7,6 +7,12 @@
category:'GDB-Core'
!
+!GDBDebuggerObject methodsFor:'accessing'!
+
+debugger
+ ^ debugger
+! !
+
!GDBDebuggerObject methodsFor:'initialization'!
setDebugger: aGDBDebugger
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/GDBStack.st Tue Sep 09 12:44:37 2014 +0100
@@ -0,0 +1,27 @@
+"{ Package: 'jv:libgdbs' }"
+
+SequenceableCollection subclass:#GDBStack
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'GDB-Core'
+!
+
+!GDBStack class methodsFor:'instance creation'!
+
+newWithThread:arg
+ "raise an error: this method should be implemented (TODO)"
+
+ ^ self shouldImplement
+
+ "Created: / 09-09-2014 / 00:05:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!GDBStack class methodsFor:'misc ui support'!
+
+iconInBrowserSymbol
+ <resource: #programImage>
+
+ ^ #containerClassBrowserIcon
+! !
+
--- a/GDBThread.st Mon Sep 08 23:56:17 2014 +0100
+++ b/GDBThread.st Tue Sep 09 12:44:37 2014 +0100
@@ -1,7 +1,7 @@
"{ Package: 'jv:libgdbs' }"
GDBDebuggerObject subclass:#GDBThread
- instanceVariableNames:'id group status'
+ instanceVariableNames:'id group status stack'
classVariableNames:''
poolDictionaries:''
category:'GDB-Core'
@@ -35,6 +35,20 @@
^ id
"Created: / 07-09-2014 / 22:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+stack
+ self ensureIsStopped.
+ stack isNil ifTrue:[
+ stack := GDBStack newWithThread: self.
+ ].
+ ^ stack
+
+ "Created: / 09-09-2014 / 00:02:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+status
+ ^ status
! !
!GDBThread methodsFor:'initialization'!
@@ -56,9 +70,13 @@
!
setStatus: aGDBThreadStatus
- status := aGDBThreadStatus
+ status := aGDBThreadStatus.
+ status isStopped ifFalse:[
+ stack := nil.
+ ].
"Created: / 07-09-2014 / 23:25:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 09-09-2014 / 00:04:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
setTerminated
@@ -68,6 +86,19 @@
"Modified: / 07-09-2014 / 23:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!GDBThread methodsFor:'private'!
+
+ensureIsStopped
+ self isStopped ifTrue:[
+ (GDBInvalidObject newException)
+ parameter:self;
+ messageText:'Invalid state (thread is running or already dead)';
+ raise.
+ ].
+
+ "Created: / 09-09-2014 / 00:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!GDBThread methodsFor:'testing'!
isRunning
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/GDBThreadSelectedEvent.st Tue Sep 09 12:44:37 2014 +0100
@@ -0,0 +1,15 @@
+"{ Package: 'jv:libgdbs' }"
+
+GDBNotificationEvent subclass:#GDBThreadSelectedEvent
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ category:'GDB-Core-Events'
+!
+
+!GDBThreadSelectedEvent methodsFor:'accessing'!
+
+type
+ ^ 'thread-selected'
+! !
+
--- a/Make.proto Mon Sep 08 23:56:17 2014 +0100
+++ b/Make.proto Tue Sep 09 12:44:37 2014 +0100
@@ -138,6 +138,7 @@
$(OUTDIR)GDBPTY.$(O) GDBPTY.$(H): GDBPTY.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBProcess.$(O) GDBProcess.$(H): GDBProcess.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBSessionRecord.$(O) GDBSessionRecord.$(H): GDBSessionRecord.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/OrderedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(STCHDR)
+$(OUTDIR)GDBStack.$(O) GDBStack.$(H): GDBStack.st $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(STCHDR)
$(OUTDIR)GDBThreadStatus.$(O) GDBThreadStatus.$(H): GDBThreadStatus.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBValueDescriptor.$(O) GDBValueDescriptor.$(H): GDBValueDescriptor.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBValueDescriptorError.$(O) GDBValueDescriptorError.$(H): GDBValueDescriptorError.st $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -299,6 +300,7 @@
$(OUTDIR)GDBStoppedEvent.$(O) GDBStoppedEvent.$(H): GDBStoppedEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBExecutionEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBThreadEvent.$(O) GDBThreadEvent.$(H): GDBThreadEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBNotificationEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBThreadGroupEvent.$(O) GDBThreadGroupEvent.$(H): GDBThreadGroupEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBNotificationEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)GDBThreadSelectedEvent.$(O) GDBThreadSelectedEvent.$(H): GDBThreadSelectedEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBNotificationEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBBreakpointCreatedEvent.$(O) GDBBreakpointCreatedEvent.$(H): GDBBreakpointCreatedEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBBreakpointEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBNotificationEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBBreakpointModifiedEvent.$(O) GDBBreakpointModifiedEvent.$(H): GDBBreakpointModifiedEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBBreakpointEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBNotificationEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)GDBThreadCreatedEvent.$(O) GDBThreadCreatedEvent.$(H): GDBThreadCreatedEvent.st $(INCLUDE_TOP)/jv/libgdbs/GDBAsyncEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBNotificationEvent.$(H) $(INCLUDE_TOP)/jv/libgdbs/GDBThreadEvent.$(H) $(INCLUDE_TOP)/stx/goodies/announcements/Announcement.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Make.spec Mon Sep 08 23:56:17 2014 +0100
+++ b/Make.spec Tue Sep 09 12:44:37 2014 +0100
@@ -61,6 +61,7 @@
GDBPTY \
GDBProcess \
GDBSessionRecord \
+ GDBStack \
GDBThreadStatus \
GDBValueDescriptor \
GDBValueDescriptorError \
@@ -222,6 +223,7 @@
GDBStoppedEvent \
GDBThreadEvent \
GDBThreadGroupEvent \
+ GDBThreadSelectedEvent \
GDBBreakpointCreatedEvent \
GDBBreakpointModifiedEvent \
GDBThreadCreatedEvent \
@@ -245,6 +247,7 @@
$(OUTDIR_SLASH)GDBPTY.$(O) \
$(OUTDIR_SLASH)GDBProcess.$(O) \
$(OUTDIR_SLASH)GDBSessionRecord.$(O) \
+ $(OUTDIR_SLASH)GDBStack.$(O) \
$(OUTDIR_SLASH)GDBThreadStatus.$(O) \
$(OUTDIR_SLASH)GDBValueDescriptor.$(O) \
$(OUTDIR_SLASH)GDBValueDescriptorError.$(O) \
@@ -406,6 +409,7 @@
$(OUTDIR_SLASH)GDBStoppedEvent.$(O) \
$(OUTDIR_SLASH)GDBThreadEvent.$(O) \
$(OUTDIR_SLASH)GDBThreadGroupEvent.$(O) \
+ $(OUTDIR_SLASH)GDBThreadSelectedEvent.$(O) \
$(OUTDIR_SLASH)GDBBreakpointCreatedEvent.$(O) \
$(OUTDIR_SLASH)GDBBreakpointModifiedEvent.$(O) \
$(OUTDIR_SLASH)GDBThreadCreatedEvent.$(O) \
--- a/abbrev.stc Mon Sep 08 23:56:17 2014 +0100
+++ b/abbrev.stc Tue Sep 09 12:44:37 2014 +0100
@@ -13,6 +13,7 @@
GDBProcess GDBProcess jv:libgdbs 'GDB-Private' 0
GDBSessionRecord GDBSessionRecord jv:libgdbs 'GDB-Private-Simulator' 0
GDBSimulatorResource GDBSimulatorResource jv:libgdbs 'GDB-Resources' 1
+GDBStack GDBStack jv:libgdbs 'GDB-Core' 0
GDBThreadStatus GDBThreadStatus jv:libgdbs 'GDB-Core' 0
GDBValueDescriptor GDBValueDescriptor jv:libgdbs 'GDB-Private-Descriptors' 0
GDBValueDescriptorError GDBValueDescriptorError jv:libgdbs 'GDB-Private-Descriptors' 1
@@ -174,6 +175,7 @@
GDBStoppedEvent GDBStoppedEvent jv:libgdbs 'GDB-Core-Events' 0
GDBThreadEvent GDBThreadEvent jv:libgdbs 'GDB-Core-Events' 0
GDBThreadGroupEvent GDBThreadGroupEvent jv:libgdbs 'GDB-Core-Events' 0
+GDBThreadSelectedEvent GDBThreadSelectedEvent jv:libgdbs 'GDB-Core-Events' 0
GDBBreakpointCreatedEvent GDBBreakpointCreatedEvent jv:libgdbs 'GDB-Core-Events' 0
GDBBreakpointModifiedEvent GDBBreakpointModifiedEvent jv:libgdbs 'GDB-Core-Events' 0
GDBThreadCreatedEvent GDBThreadCreatedEvent jv:libgdbs 'GDB-Core-Events' 0
--- a/bc.mak Mon Sep 08 23:56:17 2014 +0100
+++ b/bc.mak Tue Sep 09 12:44:37 2014 +0100
@@ -84,6 +84,7 @@
$(OUTDIR)GDBPTY.$(O) GDBPTY.$(H): GDBPTY.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBProcess.$(O) GDBProcess.$(H): GDBProcess.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBSessionRecord.$(O) GDBSessionRecord.$(H): GDBSessionRecord.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\OrderedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(STCHDR)
+$(OUTDIR)GDBStack.$(O) GDBStack.$(H): GDBStack.st $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(STCHDR)
$(OUTDIR)GDBThreadStatus.$(O) GDBThreadStatus.$(H): GDBThreadStatus.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBValueDescriptor.$(O) GDBValueDescriptor.$(H): GDBValueDescriptor.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBValueDescriptorError.$(O) GDBValueDescriptorError.$(H): GDBValueDescriptorError.st $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -245,6 +246,7 @@
$(OUTDIR)GDBStoppedEvent.$(O) GDBStoppedEvent.$(H): GDBStoppedEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBExecutionEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBThreadEvent.$(O) GDBThreadEvent.$(H): GDBThreadEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBNotificationEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBThreadGroupEvent.$(O) GDBThreadGroupEvent.$(H): GDBThreadGroupEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBNotificationEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)GDBThreadSelectedEvent.$(O) GDBThreadSelectedEvent.$(H): GDBThreadSelectedEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBNotificationEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBBreakpointCreatedEvent.$(O) GDBBreakpointCreatedEvent.$(H): GDBBreakpointCreatedEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBBreakpointEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBNotificationEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBBreakpointModifiedEvent.$(O) GDBBreakpointModifiedEvent.$(H): GDBBreakpointModifiedEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBBreakpointEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBNotificationEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)GDBThreadCreatedEvent.$(O) GDBThreadCreatedEvent.$(H): GDBThreadCreatedEvent.st $(INCLUDE_TOP)\jv\libgdbs\GDBAsyncEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBNotificationEvent.$(H) $(INCLUDE_TOP)\jv\libgdbs\GDBThreadEvent.$(H) $(INCLUDE_TOP)\stx\goodies\announcements\Announcement.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/jv_libgdbs.st Mon Sep 08 23:56:17 2014 +0100
+++ b/jv_libgdbs.st Tue Sep 09 12:44:37 2014 +0100
@@ -78,6 +78,7 @@
GDBProcess
GDBSessionRecord
(GDBSimulatorResource autoload)
+ GDBStack
GDBThreadStatus
GDBValueDescriptor
GDBValueDescriptorError
@@ -239,6 +240,7 @@
GDBStoppedEvent
GDBThreadEvent
GDBThreadGroupEvent
+ GDBThreadSelectedEvent
GDBBreakpointCreatedEvent
GDBBreakpointModifiedEvent
GDBThreadCreatedEvent
--- a/libInit.cc Mon Sep 08 23:56:17 2014 +0100
+++ b/libInit.cc Tue Sep 09 12:44:37 2014 +0100
@@ -38,6 +38,7 @@
_GDBPTY_Init(pass,__pRT__,snd);
_GDBProcess_Init(pass,__pRT__,snd);
_GDBSessionRecord_Init(pass,__pRT__,snd);
+_GDBStack_Init(pass,__pRT__,snd);
_GDBThreadStatus_Init(pass,__pRT__,snd);
_GDBValueDescriptor_Init(pass,__pRT__,snd);
_GDBValueDescriptorError_Init(pass,__pRT__,snd);
@@ -199,6 +200,7 @@
_GDBStoppedEvent_Init(pass,__pRT__,snd);
_GDBThreadEvent_Init(pass,__pRT__,snd);
_GDBThreadGroupEvent_Init(pass,__pRT__,snd);
+_GDBThreadSelectedEvent_Init(pass,__pRT__,snd);
_GDBBreakpointCreatedEvent_Init(pass,__pRT__,snd);
_GDBBreakpointModifiedEvent_Init(pass,__pRT__,snd);
_GDBThreadCreatedEvent_Init(pass,__pRT__,snd);
--- a/libgdbs.rc Mon Sep 08 23:56:17 2014 +0100
+++ b/libgdbs.rc Tue Sep 09 12:44:37 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, 08 Sep 2014 09:01:46 GMT\0"
+ VALUE "ProductDate", "Tue, 09 Sep 2014 11:44:03 GMT\0"
END
END
--- a/tests/tests.rc Mon Sep 08 23:56:17 2014 +0100
+++ b/tests/tests.rc Tue Sep 09 12:44:37 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, 08 Sep 2014 09:01:48 GMT\0"
+ VALUE "ProductDate", "Tue, 09 Sep 2014 11:44:04 GMT\0"
END
END