mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +02:00
Bug 415006 - Incorrect handling of empty string as program argument in
debug mode (CDI)
This commit is contained in:
parent
9685809373
commit
767a83a455
1 changed files with 14 additions and 1 deletions
|
@ -22,6 +22,19 @@ package org.eclipse.cdt.debug.mi.core.command;
|
||||||
public class MIExecArguments extends MICommand
|
public class MIExecArguments extends MICommand
|
||||||
{
|
{
|
||||||
public MIExecArguments(String miVersion, String[] args) {
|
public MIExecArguments(String miVersion, String[] args) {
|
||||||
super(miVersion, "-exec-arguments", args); //$NON-NLS-1$
|
super(miVersion, "-exec-arguments", processArguments(args)); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String[] processArguments(String[] args) {
|
||||||
|
String[] result = new String[args.length];
|
||||||
|
for (int i = 0; i < result.length; ++i) {
|
||||||
|
if (args[i].isEmpty()) {
|
||||||
|
result[i] = "''"; //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result[i] = args[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue