Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2002-10-02 04:54:20 +0000
committerAlain Magloire2002-10-02 04:54:20 +0000
commitaeb2c89c9006756db41323c5357f380f95a4c7c8 (patch)
treed0a5fbf62818b79b840f9214be16a82631234dfe
parentbdee45066bf651c4cf0474c70c0f1e79c6553e59 (diff)
downloadorg.eclipse.cdt-aeb2c89c9006756db41323c5357f380f95a4c7c8.tar.gz
org.eclipse.cdt-aeb2c89c9006756db41323c5357f380f95a4c7c8.tar.xz
org.eclipse.cdt-aeb2c89c9006756db41323c5357f380f95a4c7c8.zip
Only pass -- if an argument starts with '-'
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java
index ab5ce61856c..f9f23bdd22b 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/MICommand.java
@@ -85,8 +85,14 @@ public class MICommand extends Command
}
}
if (parameters != null && parameters.length > 0) {
+ // Add a "--" separator if a parameter starts with "-"
if (options != null && options.length > 0) {
- command += " --";
+ for (int i = 0; i < parameters.length; i++) {
+ if (parameters[i].startsWith("-")) {
+ command += " --";
+ break;
+ }
+ }
}
for (int i = 0; i < parameters.length; i++) {
// According to the MI documentation '-' is not permitted

Back to the top