diff options
author | Alain Magloire | 2002-10-02 04:54:20 +0000 |
---|---|---|
committer | Alain Magloire | 2002-10-02 04:54:20 +0000 |
commit | aeb2c89c9006756db41323c5357f380f95a4c7c8 (patch) | |
tree | d0a5fbf62818b79b840f9214be16a82631234dfe | |
parent | bdee45066bf651c4cf0474c70c0f1e79c6553e59 (diff) | |
download | org.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.java | 8 |
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 |