Fix: use `VDBUnixDebuggerConsoleApplication` only when GDB's process is a UNIX process
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 13 Dec 2018 14:56:29 +0000
changeset 128 d2786cef6a21
parent 127 37d9f13932c2
child 129 974e705572ea
Fix: use `VDBUnixDebuggerConsoleApplication` only when GDB's process is a UNIX process ...having separate streams for CLI console (usually a PTY). This is to handle cases when `GDBStXSimpleProcess` is used even if VDB runs on UNIX systems.
VDBDebuggerApplication.st
VDBSimpleDebuggerConsoleApplication.st
--- a/VDBDebuggerApplication.st	Wed Dec 12 16:35:20 2018 +0000
+++ b/VDBDebuggerApplication.st	Thu Dec 13 14:56:29 2018 +0000
@@ -1096,19 +1096,27 @@
 !VDBDebuggerApplication methodsFor:'aspects-panes'!
 
 consolePane
-    | pane |
+    | pane useUnixConsole |
 
     pane := VDBTabbingContainer new.
-    OperatingSystem isMSWINDOWSlike ifTrue:[
-        pane addApplication:VDBSimpleDebuggerConsoleApplication new.
-    ] ifFalse:[
+
+    debugger notNil ifTrue:[ 
+        useUnixConsole := debugger consoleOutput notNil and:[ debugger consoleInput notNil ]
+    ] ifFalse:[ 
+        useUnixConsole := OperatingSystem isUNIXlike.
+    ].
+
+    useUnixConsole ifTrue:[
         pane addApplication:VDBUnixDebuggerConsoleApplication new.
         pane addApplication:VDBUnixInferiorConsoleApplication new.
+    ] ifFalse:[
+        pane addApplication:VDBSimpleDebuggerConsoleApplication new.
     ].
     pane addApplication:VDBEventLogApplication new.
     ^ pane
 
     "Created: / 04-10-2018 / 11:08:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 12-12-2018 / 22:43:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !VDBDebuggerApplication methodsFor:'change & update'!
--- a/VDBSimpleDebuggerConsoleApplication.st	Wed Dec 12 16:35:20 2018 +0000
+++ b/VDBSimpleDebuggerConsoleApplication.st	Thu Dec 13 14:56:29 2018 +0000
@@ -57,9 +57,9 @@
      the UIPainter may not be able to read the specification."
 
     "
-     UIPainter new openOnClass:VDBConsoleApplication andSelector:#windowSpec
-     VDBConsoleApplication new openInterface:#windowSpec
-     VDBConsoleApplication open
+     UIPainter new openOnClass:VDBSimpleDebuggerConsoleApplication andSelector:#windowSpec
+     VDBSimpleDebuggerConsoleApplication new openInterface:#windowSpec
+     VDBSimpleDebuggerConsoleApplication open
     "
 
     <resource: #canvas>
@@ -67,10 +67,12 @@
     ^ 
     #(FullSpec
        name: windowSpec
+       uuid: '28fb22b0-fe61-11e8-90a6-606720e43e2c'
        window: 
       (WindowSpec
          label: 'Debugger Console'
          name: 'Debugger Console'
+         uuid: '28fb22b1-fe61-11e8-90a6-606720e43e2c'
          min: (Point 10 10)
          bounds: (Rectangle 0 0 782 332)
        )
@@ -80,6 +82,11 @@
           (ArbitraryComponentSpec
              name: 'Console'
              layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+             uuid: '28fb22b2-fe61-11e8-90a6-606720e43e2c'
+             hasHorizontalScrollBar: true
+             hasVerticalScrollBar: true
+             miniScrollerHorizontal: true
+             autoHideScrollBars: true
              hasBorder: false
              component: consoleView
            )
@@ -87,8 +94,6 @@
         
        )
      )
-
-    "Modified: / 09-06-2014 / 09:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !VDBSimpleDebuggerConsoleApplication class methodsFor:'plugIn spec'!