Fixes for debugger/inferior console.
* debugger console: so not start REPL process multiple times
* inferior console: re-register streams when debugger changes.
--- a/VDBDebuggerConsoleApplication.st Tue Jun 10 17:46:14 2014 +0100
+++ b/VDBDebuggerConsoleApplication.st Tue Jun 10 21:12:15 2014 +0100
@@ -102,21 +102,24 @@
!VDBDebuggerConsoleApplication methodsFor:'hooks'!
commonPostOpen
- consoleProcess :=
- [
+ consoleProcess isNil ifTrue:[
+ consoleProcess :=
[
- | cmd |
- consoleOutput nextPutAll:'(gdb) '.
- cmd := consoleInput nextLine asString.
- consoleOutput nextPutLine: cmd.
- consoleOutput nextPut: Character return.
- debugger send: (GDBCLICommand new value: cmd) wait: true.
- ] loop.
- ] newProcess.
- consoleProcess name: 'VDB Debugger Console REPL loop'.
- consoleProcess resume.
+ [
+ | cmd |
+ consoleOutput nextPutAll:'(gdb) '.
+ cmd := consoleInput nextLine asString.
+ consoleOutput nextPutLine: cmd.
+ consoleOutput nextPut: Character return.
+ debugger send: (GDBCLICommand new value: cmd) wait: true.
+ ] loop.
+ ] newProcess.
+ consoleProcess name: 'VDB Debugger Console REPL loop'.
+ consoleProcess resume.
+ ].
"Created: / 10-06-2014 / 01:25:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 10-06-2014 / 19:55:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!VDBDebuggerConsoleApplication methodsFor:'initialization & release'!
--- a/VDBInferiorConsoleApplication.st Tue Jun 10 17:46:14 2014 +0100
+++ b/VDBInferiorConsoleApplication.st Tue Jun 10 21:12:15 2014 +0100
@@ -71,6 +71,20 @@
!VDBInferiorConsoleApplication methodsFor:'initialization & release'!
+subscribe
+ "Register for debugger events. To be overrided by subclasses"
+
+ super subscribe.
+ (debugger notNil and:[consoleView notNil]) ifTrue:[
+ consoleView stopReaderProcess.
+ consoleView inStream: debugger inferiorStdin.
+ consoleView outStream: debugger inferiorStdout.
+ consoleView startReaderProcessWhenVisible.
+ ].
+
+ "Created: / 10-06-2014 / 21:02:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
unsubscribe
"Unsubscribe myself fo debugger events"
--- a/tests/tests.rc Tue Jun 10 17:46:14 2014 +0100
+++ b/tests/tests.rc Tue Jun 10 21:12:15 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", "Tue, 10 Jun 2014 16:44:36 GMT\0"
+ VALUE "ProductDate", "Tue, 10 Jun 2014 20:10:15 GMT\0"
END
END
--- a/vdb.rc Tue Jun 10 17:46:14 2014 +0100
+++ b/vdb.rc Tue Jun 10 21:12:15 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", "Tue, 10 Jun 2014 16:44:34 GMT\0"
+ VALUE "ProductDate", "Tue, 10 Jun 2014 20:10:13 GMT\0"
END
END