1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

[286785] - undoing early escaping in RxThread and adding to MIParser

This commit is contained in:
Alena Laskavaia 2009-09-03 18:27:06 +00:00
parent 0f82f86fa9
commit d934960d33
2 changed files with 6 additions and 2 deletions

View file

@ -357,7 +357,7 @@ public class RxThread extends Thread {
OutputStream target = session.getMIInferior().getPipedOutputStream();
if (target != null) {
MITargetStreamOutput out = (MITargetStreamOutput) stream;
String str = out.getCString();
String str = out.getString();
if (str != null) {
try {
target.write(str.getBytes());

View file

@ -242,7 +242,11 @@ public class MIParser {
} else {
// Badly format MI line, just pass it to the user as target stream
MIStreamRecord stream = new MITargetStreamOutput();
stream.setCString(buffer.toString() + "\n"); //$NON-NLS-1$
String res = buffer.toString();
// this awfull expression just mean to replace \ with \\. This is needed because otherwise escaping is lost.
// this is to fix bug 255946 without breaking other stuff 286785
res = res.replaceAll("\\Q\\", "\\\\\\\\"); //$NON-NLS-1$//$NON-NLS-2$
stream.setCString(res + "\n"); //$NON-NLS-1$
oob = stream;
}
return oob;