mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-21 15:23:59 +02:00
GDB does not make any interpretation for the
set environment command ... we should pass the string raw. PR 49148
This commit is contained in:
parent
3def1b75b9
commit
b0f0d50125
3 changed files with 26 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue