Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/ChangeLog14
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java9
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java8
3 files changed, 26 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
index e1873cb5216..79baed360cc 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog
@@ -1,3 +1,17 @@
+2003-12-18 Alain Magloire
+
+ PR 49148
+ Set environment variable value to give the program.
+ Arguments are VAR VALUE where VAR is variable name and VALUE is value.
+ VALUES of environment variables are uninterpreted strings.
+ This does not affect the program until the next "run" command.
+
+ So pass the string raw.
+
+ * src/org/eclipse/cdt/debug/mi/core/command/MIGDBSetEnvironment.java
+ * src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
+ * src/org/eclipse/cdt/debug/mi/core/CommandFactory.java
+
2003-12-17 Mikhail Khodjaiants
Fix for bug 49061: Different values are used as default for the "Load shared library symbols automatically" option.
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
index 38419382c57..46250887caa 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/cdi/RuntimeOptions.java
@@ -15,7 +15,7 @@ import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIEnvironmentCD;
import org.eclipse.cdt.debug.mi.core.command.MIExecArguments;
-import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
+import org.eclipse.cdt.debug.mi.core.command.MIGDBSetEnvironment;
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
/**
@@ -64,12 +64,11 @@ public class RuntimeOptions implements ICDIRuntimeOptions {
String value = props.getProperty(key);
String params[] = null;
if (value == null || value.length() == 0) {
- params = new String[] {"environment", key};
+ params = new String[] {key};
} else {
- String var = key + "=" + value;
- params = new String[] {"environment", var};
+ params = new String[] {key, value};
}
- MIGDBSet set = factory.createMIGDBSet(params);
+ MIGDBSetEnvironment set = factory.createMIGDBSetEnvironment(params);
try {
mi.postCommand(set);
MIInfo info = set.getMIInfo();
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
index 2ef3145589c..5d9b5f330f1 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/command/CommandFactory.java
@@ -109,6 +109,14 @@ public class CommandFactory {
return new MIEnvironmentPWD();
}
+ /**
+ * @param params
+ * @return
+ */
+ public MIGDBSetEnvironment createMIGDBSetEnvironment(String[] params) {
+ return new MIGDBSetEnvironment(params);
+ }
+
public MIExecAbort createMIExecAbort() {
return new MIExecAbort();
}

Back to the top