diff options
author | Alain Magloire | 2003-12-18 23:44:12 +0000 |
---|---|---|
committer | Alain Magloire | 2003-12-18 23:44:12 +0000 |
commit | b0f0d50125136aaf8a0a0df59afbca78f7f281ba (patch) | |
tree | bc87327182d461c60dd8ed4c1625f5aafe688d5e | |
parent | 3def1b75b9d92da61d5ec70916ff91aa2c955586 (diff) | |
download | org.eclipse.cdt-b0f0d50125136aaf8a0a0df59afbca78f7f281ba.tar.gz org.eclipse.cdt-b0f0d50125136aaf8a0a0df59afbca78f7f281ba.tar.xz org.eclipse.cdt-b0f0d50125136aaf8a0a0df59afbca78f7f281ba.zip |
GDB does not make any interpretation for the
set environment command ... we should pass
the string raw. PR 49148
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(); } |