mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Go around a bug in GDB/MI the doc says that any parameters
containing "-" should be quoted but it appears that gdb/MI does not remove the quotes.
This commit is contained in:
parent
cff216f9b7
commit
9b08976a71
2 changed files with 4 additions and 2 deletions
|
@ -84,8 +84,9 @@ public class MICommand extends Command
|
|||
command += " --";
|
||||
}
|
||||
for (int i = 0; i < parameters.length; i++) {
|
||||
if (parameters[i].indexOf('-') != -1 ||
|
||||
parameters[i].indexOf('\n') != -1 ||
|
||||
// According to the MI documentation '-' is not permitted
|
||||
//(parameters[i].indexOf('-') != -1 || parameters[i].indexof(\n)
|
||||
if (parameters[i].indexOf('\t') != -1 ||
|
||||
parameters[i].indexOf('\"') != -1||
|
||||
parameters[i].indexOf(' ') != -1) {
|
||||
command += " \"" + parameters[i] + "\"";
|
||||
|
|
|
@ -18,4 +18,5 @@ public class MIEnvironmentDirectory extends MICommand
|
|||
public MIEnvironmentDirectory(String[] paths) {
|
||||
super("-environment-directory", paths);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue