equal
deleted
inserted
replaced
113 ! ! |
113 ! ! |
114 |
114 |
115 !GDBWindowsProcess methodsFor:'initialization & release'! |
115 !GDBWindowsProcess methodsFor:'initialization & release'! |
116 |
116 |
117 initialize |
117 initialize |
118 | inputPipe input outputPipe output errorPipe error args | |
118 | exe inputPipe input outputPipe output errorPipe error args | |
|
119 |
|
120 exe := self class gdbExecutable. |
|
121 (exe isNil or:[ exe asFilename isExecutable not ]) ifTrue:[ |
|
122 GDBError raiseErrorString: 'Could not find gdb, please set path to gdb using GDBProcess class >> gdbExecutable:'. |
|
123 ^ self. |
|
124 ]. |
119 |
125 |
120 inputPipe := NonPositionableExternalStream makePipe. |
126 inputPipe := NonPositionableExternalStream makePipe. |
121 input := inputPipe second. |
127 input := inputPipe second. |
122 outputPipe := NonPositionableExternalStream makePipe. |
128 outputPipe := NonPositionableExternalStream makePipe. |
123 output := outputPipe first. |
129 output := outputPipe first. |
124 errorPipe := NonPositionableExternalStream makePipe. |
130 errorPipe := NonPositionableExternalStream makePipe. |
125 error := outputPipe first. |
131 error := outputPipe first. |
126 |
132 |
127 args := (Array new: 7) |
133 args := (Array new: 7) |
128 at: 1 put: self class gdbExecutable ? (ExternalAddress pointerSize == 8 ifTrue:['C:\msys64\mingw64\bin\gdb.exe'] ifFalse:['C:\msys64\mingw32\bin\gdb.exe']) ; |
134 at: 1 put: exe; |
129 at: 2 put: '-q'; |
135 at: 2 put: '-q'; |
130 at: 3 put: '-nx'; |
136 at: 3 put: '-nx'; |
131 at: 4 put: '--interpreter'; |
137 at: 4 put: '--interpreter'; |
132 at: 5 put: 'mi2'; |
138 at: 5 put: 'mi2'; |
133 at: 6 put: '-ex'; |
139 at: 6 put: '-ex'; |
164 self error:'Failed to launch gdb'. |
170 self error:'Failed to launch gdb'. |
165 ]. |
171 ]. |
166 |
172 |
167 "Created: / 12-12-2017 / 21:04:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
173 "Created: / 12-12-2017 / 21:04:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
168 "Modified: / 15-01-2018 / 09:35:03 / jv" |
174 "Modified: / 15-01-2018 / 09:35:03 / jv" |
169 "Modified: / 03-09-2018 / 09:23:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
175 "Modified: / 03-10-2018 / 22:22:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
170 ! |
176 ! |
171 |
177 |
172 release |
178 release |
173 pid := connection := nil. |
179 pid := connection := nil. |
174 debuggerInput notNil ifTrue:[ debuggerInput close ]. |
180 debuggerInput notNil ifTrue:[ debuggerInput close ]. |