Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2009-09-03 14:27:06 -0400
committerAlena Laskavaia2009-09-03 14:27:06 -0400
commitd934960d33ed02da5499c629c3a8ad7192091a32 (patch)
treedb07b6e710967f82cc44d59c3fe4cde2156a0d48 /debug/org.eclipse.cdt.debug.mi.core
parent0f82f86fa935910c8bd5feeca0afb9566ceb39da (diff)
downloadorg.eclipse.cdt-d934960d33ed02da5499c629c3a8ad7192091a32.tar.gz
org.eclipse.cdt-d934960d33ed02da5499c629c3a8ad7192091a32.tar.xz
org.eclipse.cdt-d934960d33ed02da5499c629c3a8ad7192091a32.zip
[286785] - undoing early escaping in RxThread and adding to MIParser
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/RxThread.java2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/output/MIParser.java6
2 files changed, 6 insertions, 2 deletions
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 16cb62e4af..9aafae122f 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 @@ 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());
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 1565077be8..476cf30e21 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 @@ 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;

Back to the top