author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 22 Sep 2014 22:50:28 +0100 | |
changeset 24 | c33a063cb363 |
parent 14 | 214fde0c3742 |
child 27 | 221096c8f6ba |
permissions | -rw-r--r-- |
0 | 1 |
"{ Package: 'jv:vdb' }" |
2 |
||
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
3 |
VDBAbstractApplication subclass:#VDBDebuggerConsoleApplication |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
4 |
instanceVariableNames:'consoleView consoleInput consoleOutput consoleOutputLock |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
5 |
consoleProcess consolePromptPrinted outstandingCommand |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
6 |
outstandingCommandToken outstandingCommandBlocker |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
7 |
ignoreNextLogStreamEvent' |
0 | 8 |
classVariableNames:'' |
9 |
poolDictionaries:'' |
|
10 |
category:'VDB-UI-Console' |
|
11 |
! |
|
12 |
||
13 |
||
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
14 |
!VDBDebuggerConsoleApplication class methodsFor:'interface specs'! |
0 | 15 |
|
16 |
windowSpec |
|
17 |
"This resource specification was automatically generated |
|
18 |
by the UIPainter of ST/X." |
|
19 |
||
20 |
"Do not manually edit this!! If it is corrupted, |
|
21 |
the UIPainter may not be able to read the specification." |
|
22 |
||
23 |
" |
|
24 |
UIPainter new openOnClass:VDBConsoleApplication andSelector:#windowSpec |
|
25 |
VDBConsoleApplication new openInterface:#windowSpec |
|
26 |
VDBConsoleApplication open |
|
27 |
" |
|
28 |
||
29 |
<resource: #canvas> |
|
30 |
||
31 |
^ |
|
32 |
#(FullSpec |
|
33 |
name: windowSpec |
|
34 |
window: |
|
35 |
(WindowSpec |
|
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
36 |
label: 'Debugger Console' |
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
37 |
name: 'Debugger Console' |
0 | 38 |
min: (Point 10 10) |
39 |
bounds: (Rectangle 0 0 782 332) |
|
40 |
) |
|
41 |
component: |
|
42 |
(SpecCollection |
|
43 |
collection: ( |
|
44 |
(ArbitraryComponentSpec |
|
45 |
name: 'Console' |
|
46 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
47 |
hasBorder: false |
|
48 |
component: consoleView |
|
49 |
) |
|
50 |
) |
|
51 |
||
52 |
) |
|
53 |
) |
|
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
54 |
|
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
55 |
"Modified: / 09-06-2014 / 09:57:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 56 |
! ! |
57 |
||
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
58 |
!VDBDebuggerConsoleApplication methodsFor:'aspects'! |
0 | 59 |
|
60 |
consoleView |
|
61 |
consoleView isNil ifTrue:[ |
|
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
62 |
consoleView := VDBDebuggerConsoleView new. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
63 |
consoleView localEcho:true. |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
64 |
consoleView inputTranslateCRToNL:true. |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
65 |
consoleView lineEditMode: true. |
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
66 |
consoleView inStream: consoleInput. |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
67 |
consoleView outStream: consoleOutput. |
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
68 |
consoleView startReaderProcessWhenVisible. |
0 | 69 |
]. |
70 |
^ consoleView |
|
71 |
||
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
72 |
"Created: / 09-06-2014 / 10:11:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
5
fac6e83fd5c0
Implemented VDBTabbingContainer.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
4
diff
changeset
|
73 |
"Modified (format): / 10-06-2014 / 17:40:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
74 |
! ! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
75 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
76 |
!VDBDebuggerConsoleApplication methodsFor:'event handling'! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
77 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
78 |
onCommandEvent: event |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
79 |
event command == outstandingCommand ifTrue:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
80 |
outstandingCommandToken := event token. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
81 |
ignoreNextLogStreamEvent := true. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
82 |
]. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
83 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
84 |
"Created: / 06-06-2014 / 22:43:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
85 |
"Modified: / 11-06-2014 / 12:35:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
86 |
! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
87 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
88 |
onCommandResultEvent: event |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
89 |
outstandingCommandToken notNil ifTrue:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
90 |
event token == outstandingCommandToken ifTrue:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
91 |
outstandingCommand := outstandingCommandToken := nil. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
92 |
outstandingCommandBlocker signalForAll. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
93 |
]. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
94 |
]. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
95 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
96 |
"Created: / 06-06-2014 / 22:44:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
97 |
"Modified: / 11-06-2014 / 11:49:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
98 |
! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
99 |
|
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
100 |
onEventSetProcessingFinished: event |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
101 |
self showPrompt. |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
102 |
|
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
103 |
"Created: / 18-09-2014 / 23:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
104 |
! |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
105 |
|
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
106 |
onLogOutputEvent: event |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
107 |
ignoreNextLogStreamEvent ifTrue:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
108 |
ignoreNextLogStreamEvent := false. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
109 |
] ifFalse:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
110 |
self onStreamOutputEvent: event |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
111 |
] |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
112 |
|
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
113 |
"Created: / 11-06-2014 / 12:37:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 114 |
! |
115 |
||
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
116 |
onStreamOutputEvent: event |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
117 |
consolePromptPrinted ifTrue:[ self showCR:'' ]. |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
118 |
consolePromptPrinted := false. |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
119 |
event value asStringCollection do:[:line | |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
120 |
line notEmptyOrNil ifTrue:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
121 |
self showCR: line. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
122 |
]. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
123 |
]. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
124 |
|
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
125 |
"Created: / 11-06-2014 / 12:00:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
126 |
"Modified: / 18-09-2014 / 23:18:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
127 |
! ! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
128 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
129 |
!VDBDebuggerConsoleApplication methodsFor:'hooks'! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
130 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
131 |
commonPostOpen |
6
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
132 |
consoleProcess isNil ifTrue:[ |
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
133 |
consoleProcess := |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
134 |
[ |
6
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
135 |
[ |
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
136 |
| cmd | |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
137 |
self showPrompt. |
6
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
138 |
cmd := consoleInput nextLine asString. |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
139 |
consolePromptPrinted := false. |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
140 |
self showCR: cmd. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
141 |
debugger send: (outstandingCommand := GDBCLICommand new value: cmd) wait: false. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
142 |
outstandingCommandBlocker wait. |
6
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
143 |
] loop. |
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
144 |
] newProcess. |
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
145 |
consoleProcess name: 'VDB Debugger Console REPL loop'. |
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
146 |
consoleProcess resume. |
981a32abdbf6
Fixes for debugger/inferior console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
147 |
]. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
148 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
149 |
"Created: / 10-06-2014 / 01:25:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
150 |
"Modified: / 18-09-2014 / 23:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
151 |
! ! |
0 | 152 |
|
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
153 |
!VDBDebuggerConsoleApplication methodsFor:'initialization & release'! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
154 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
155 |
initialize |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
156 |
super initialize. |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
157 |
|
11
43439b9e9096
Moved VDBInternalPipeStream from jv:vdb and jv:libgdbs and renamed to GDBInternalPipeStream
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8
diff
changeset
|
158 |
consoleInput := GDBInternalPipeStream new. |
43439b9e9096
Moved VDBInternalPipeStream from jv:vdb and jv:libgdbs and renamed to GDBInternalPipeStream
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
8
diff
changeset
|
159 |
consoleOutput := GDBInternalPipeStream new. |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
160 |
consoleOutputLock := RecursionLock new. |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
161 |
consolePromptPrinted := false. |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
162 |
outstandingCommandBlocker := Semaphore new. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
163 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
164 |
"Created: / 10-06-2014 / 01:23:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
165 |
"Modified: / 18-09-2014 / 23:14:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
166 |
! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
167 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
168 |
release |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
169 |
super release. |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
170 |
consoleProcess terminate. |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
171 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
172 |
"Created: / 10-06-2014 / 01:34:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
173 |
! |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
174 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
175 |
subscribe |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
176 |
"Register for debugger events. To be overrided by subclasses" |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
177 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
178 |
debugger announcer |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
179 |
when: GDBCommandEvent send: #onCommandEvent: to: self; |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
180 |
when: GDBCommandResultEvent send: #onCommandResultEvent: to: self; |
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
181 |
|
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
182 |
when: GDBConsoleOutputEvent send: #onStreamOutputEvent: to: self; |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
183 |
when: GDBTargetOutputEvent send: #onStreamOutputEvent: to: self; |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
184 |
when: GDBLogOutputEvent send: #onLogOutputEvent: to: self; |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
185 |
|
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
186 |
when: GDBEventSetProcessingFinished send: #onEventSetProcessingFinished: to: self. |
4
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
187 |
|
a7732b0afed6
VDBDebuggerConsoleApplication refactored to use custom TerminalView.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2
diff
changeset
|
188 |
"Created: / 06-06-2014 / 21:26:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
189 |
"Modified: / 18-09-2014 / 23:11:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
190 |
! ! |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
191 |
|
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
192 |
!VDBDebuggerConsoleApplication methodsFor:'private - writing'! |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
193 |
|
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
194 |
show: aString |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
195 |
consoleOutputLock critical:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
196 |
consoleOutput nextPutAll: aString. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
197 |
]. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
198 |
|
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
199 |
"Created: / 11-06-2014 / 08:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
200 |
"Modified: / 11-06-2014 / 11:53:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
201 |
! |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
202 |
|
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
203 |
showCR: aString |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
204 |
consoleOutputLock critical:[ |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
205 |
consoleOutput nextPutAll: aString. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
206 |
consoleOutput nextPut: Character nl. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
207 |
consoleOutput nextPut: Character return. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
208 |
]. |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
209 |
|
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
210 |
"Created: / 11-06-2014 / 08:02:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61e4abb26d78
Fixed fixed synchronization for debugger console view.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
211 |
"Modified: / 11-06-2014 / 11:56:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
14
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
212 |
! |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
213 |
|
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
214 |
showPrompt |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
215 |
consolePromptPrinted ifFalse:[ |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
216 |
self show: '(gdb) '. |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
217 |
consolePromptPrinted := true. |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
218 |
]. |
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
219 |
|
214fde0c3742
Improved prompt handling in debugger console.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
11
diff
changeset
|
220 |
"Created: / 18-09-2014 / 23:18:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0 | 221 |
! ! |
222 |
||
2
9741a7683808
Added VDBInferiorConsoleApplication to display debugee's input/output.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
0
diff
changeset
|
223 |
!VDBDebuggerConsoleApplication class methodsFor:'documentation'! |
0 | 224 |
|
225 |
version_HG |
|
226 |
||
227 |
^ '$Changeset: <not expanded> $' |
|
228 |
! ! |
|
229 |