diff -r 2078a57c6783 -r cb411138b295 GDBMIPrinter.st --- a/GDBMIPrinter.st Tue Jun 25 21:21:21 2019 +0100 +++ b/GDBMIPrinter.st Mon Jul 08 10:58:09 2019 +0100 @@ -164,19 +164,30 @@ printCommandCLI: aGDBCLICommand " cli-command → [ token ] cli-command nl, where cli-command is any existing GDB CLI command. + " + "/ Although MI allows "bare" CLI commands to be issued as well, + "/ there's a problem with C-escaping - some commands need C-escaping, + "/ some other do not. + "/ + "/ Try to address this by using -interpreter-exec CLI command to + "/ send it to GDB. + self printCommandMI: + (GDBMI_interpreter_exec new + token: aGDBCLICommand token; + arguments: (Array with: 'console' with: aGDBCLICommand value)) - " - aGDBCLICommand token notNil ifTrue:[ - aGDBCLICommand token printOn: stream. - ]. - self printCEscapedString: aGDBCLICommand value. - aGDBCLICommand runOnBackground ifTrue:[ - stream space; nextPut:$& - ]. + "/ Original implementation, left for reference: +"/ aGDBCLICommand token notNil ifTrue:[ +"/ aGDBCLICommand token printOn: stream. +"/ ]. +"/ self printCEscapedString: aGDBCLICommand value. +"/ aGDBCLICommand runOnBackground ifTrue:[ +"/ stream space; nextPut:$& +"/ ]. "Created: / 11-07-2017 / 21:33:00 / Jan Vrany " - "Modified: / 28-01-2019 / 21:24:53 / Jan Vrany " "Modified: / 13-03-2019 / 12:15:36 / jv" + "Modified (format): / 08-07-2019 / 10:56:10 / Jan Vrany " ! printCommandMI: aGDBMICommand