Fix ability to set working directory and env for dbgeng debug processes

This commit is contained in:
Andrew Murphy 2023-07-17 21:39:10 -05:00
parent 76af93af47
commit a45952d3f1
3 changed files with 7 additions and 7 deletions

View file

@ -199,11 +199,11 @@ public class DebugClientImpl1 implements DebugClientInternal {
BitmaskSet<DebugVerifierFlags> unusedVerifierFlags) {
ULONGLONG ullServer = new ULONGLONG(si.id);
ULONG ulFlags = new ULONG(createFlags.getBitmask());
if (unusedInitialDirectory != null) {
if (unusedInitialDirectory != null && unusedInitialDirectory.length() > 0) {
throw new UnsupportedOperationException(
"IDebugClient1 does not support 'initial directory'");
}
if (unusedEnvironment != null) {
if (unusedEnvironment != null && unusedEnvironment.length() > 0) {
throw new UnsupportedOperationException("IDebugClient1 does not support 'environment'");
}
COMUtils.checkRC(jnaClient.CreateProcess(ullServer, commandLine, ulFlags));

View file

@ -42,11 +42,11 @@ public class DebugClientImpl3 extends DebugClientImpl2 {
BitmaskSet<DebugVerifierFlags> unusedVerifierFlags) {
ULONGLONG ullServer = new ULONGLONG(si.id);
ULONG ulFlags = new ULONG(createFlags.getBitmask());
if (unusedInitialDirectory != null) {
if (unusedInitialDirectory != null && unusedInitialDirectory.length() > 0) {
throw new UnsupportedOperationException(
"IDebugClient3 does not support 'initial directory'");
}
if (unusedEnvironment != null) {
if (unusedEnvironment != null && unusedEnvironment.length() > 0) {
throw new UnsupportedOperationException("IDebugClient3 does not support 'environment'");
}
COMUtils.checkRC(jnaClient.CreateProcessWide(ullServer, new WString(commandLine), ulFlags));

View file

@ -60,12 +60,12 @@ public class DbgModelTargetProcessLaunchConnectorImpl extends DbgModelTargetObje
HashMap<String, ParameterDescription<?>> map =
new HashMap<String, ParameterDescription<?>>();
ParameterDescription<String> param = ParameterDescription.create(String.class, "args", true,
null, "Cmd", "executable to be launched");
"", "Cmd", "executable to be launched");
ParameterDescription<String> initDir =
ParameterDescription.create(String.class, "dir", false,
null, "Dir", "initial directory");
"", "Dir", "initial directory");
ParameterDescription<String> env = ParameterDescription.create(String.class, "env", false,
null, "Env (sep=/0)", "environment block");
"", "Env (sep=/0)", "environment block");
ParameterDescription<Integer> cf = ParameterDescription.create(Integer.class, "cf", true,
1, "Create Flags", "creation flags");
ParameterDescription<Integer> ef = ParameterDescription.create(Integer.class, "ef", false,