1
0
Fork 0
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:
Alain Magloire 2002-09-04 23:11:11 +00:00
parent cff216f9b7
commit 9b08976a71
2 changed files with 4 additions and 2 deletions

View file

@ -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] + "\"";

View file

@ -18,4 +18,5 @@ public class MIEnvironmentDirectory extends MICommand
public MIEnvironmentDirectory(String[] paths) {
super("-environment-directory", paths);
}
}