commit | 8a663c816d3a07745e2715ba88e62976171531c0 | [log] [tgz] |
---|---|---|
author | Alena Laskavaia <elaskavaia.cdt@gmail.com> | Thu Sep 03 18:28:12 2009 +0000 |
committer | Alena Laskavaia <elaskavaia.cdt@gmail.com> | Thu Sep 03 18:28:12 2009 +0000 |
tree | 8a5f17fe771e6e84587040bb6fbcf5522273f424 | |
parent | 6018a38286328d8177a7295cda2ffe618dc7ad2c [diff] |
[286785] - undoing early escaping in RxThread and adding to MIParser
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java index 16cb62e..9aafae1 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java +++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java
@@ -357,7 +357,7 @@ 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());
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java index 1565077..476cf30 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java +++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java
@@ -242,7 +242,11 @@ } 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;