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

Bug 320629 - MI command -gdb-set does not properly escape argument

This commit is contained in:
Alena Laskavaia 2010-07-23 14:48:49 +00:00
parent 164eb8af3b
commit 664e416fa2

View file

@ -23,4 +23,14 @@ public class MIGDBSet extends MICommand
public MIGDBSet(String miVersion, String[] params) {
super(miVersion, "-gdb-set", params); //$NON-NLS-1$
}
@Override
protected String parametersToString() {
/* gdb (at least up to 6.8) does not correctly process escaping for arguments.
* pass argument without escaping. Just in case only do it for simple cases only like -gdb-set variable value.
* For example set solib-search-path */
if (fParameters!=null && fParameters.length==2 && (fOptions==null || fOptions.length==0)) {
return fParameters[0]+" "+fParameters[1]; //$NON-NLS-1$
}
return super.parametersToString();
}
}