mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
[286785] - undoing early escaping in RxThread and adding to MIParser
This commit is contained in:
parent
0f82f86fa9
commit
d934960d33
2 changed files with 6 additions and 2 deletions
|
@ -357,7 +357,7 @@ public class RxThread extends Thread {
|
||||||
OutputStream target = session.getMIInferior().getPipedOutputStream();
|
OutputStream target = session.getMIInferior().getPipedOutputStream();
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
MITargetStreamOutput out = (MITargetStreamOutput) stream;
|
MITargetStreamOutput out = (MITargetStreamOutput) stream;
|
||||||
String str = out.getCString();
|
String str = out.getString();
|
||||||
if (str != null) {
|
if (str != null) {
|
||||||
try {
|
try {
|
||||||
target.write(str.getBytes());
|
target.write(str.getBytes());
|
||||||
|
|
|
@ -242,7 +242,11 @@ public class MIParser {
|
||||||
} else {
|
} else {
|
||||||
// Badly format MI line, just pass it to the user as target stream
|
// Badly format MI line, just pass it to the user as target stream
|
||||||
MIStreamRecord stream = new MITargetStreamOutput();
|
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;
|
oob = stream;
|
||||||
}
|
}
|
||||||
return oob;
|
return oob;
|
||||||
|
|
Loading…
Add table
Reference in a new issue