mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 320629 - MI command -gdb-set does not properly escape argument
This commit is contained in:
parent
164eb8af3b
commit
664e416fa2
1 changed files with 10 additions and 0 deletions
|
@ -23,4 +23,14 @@ public class MIGDBSet extends MICommand
|
||||||
public MIGDBSet(String miVersion, String[] params) {
|
public MIGDBSet(String miVersion, String[] params) {
|
||||||
super(miVersion, "-gdb-set", params); //$NON-NLS-1$
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue