Skip to content

Commit

Permalink
Merge pull request #36 from unknownv2/develop
Browse files Browse the repository at this point in the history
refactor: Remove WaitForDebuger flag option from CLR initialization
  • Loading branch information
unknownv2 authored Nov 6, 2018
2 parents f1853d7 + e4bc8e9 commit ca85d91
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 25 deletions.
22 changes: 0 additions & 22 deletions src/corerundll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ PrintModules (
}

// Release the handle to the process.

CloseHandle(hProcess);

return 0;
Expand Down Expand Up @@ -623,7 +622,6 @@ BOOLEAN
StartHost(
IN CONST WCHAR *dllPath,
IN Logger &log,
IN CONST BOOLEAN waitForDebugger,
_Inout_ HRESULT &exitCode,
IN CONST WCHAR *coreRoot,
IN CONST WCHAR *coreLibraries
Expand All @@ -634,23 +632,6 @@ StartHost(
return false;
}

if (waitForDebugger)
{
if (!IsDebuggerPresent())
{
log << W("Waiting for the debugger to attach. Press any key to continue ...") << Logger::endl;
getchar();
if (IsDebuggerPresent())
{
log << "Debugger is attached." << Logger::endl;
}
else
{
log << "Debugger failed to attach." << Logger::endl;
}
}
}

// Assume failure
exitCode = E_FAIL;

Expand Down Expand Up @@ -917,7 +898,6 @@ HRESULT
StartCoreCLRInternal (
IN CONST WCHAR *dllPath,
IN CONST BOOLEAN verbose,
IN CONST BOOLEAN waitForDebugger,
IN CONST WCHAR *coreRoot,
IN CONST WCHAR *coreLibraries
)
Expand All @@ -936,7 +916,6 @@ StartCoreCLRInternal (
StartHost(
dllPath,
*log,
waitForDebugger,
exitCode,
coreRoot,
coreLibraries);
Expand All @@ -956,7 +935,6 @@ StartCoreCLR(
return StartCoreCLRInternal(
args->BinaryFilePath,
args->Verbose,
args->WaitForDebugger,
args->CoreRootPath,
args->CoreLibrariesPath);
}
Expand Down
3 changes: 1 addition & 2 deletions src/corerundll.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
struct BinaryLoaderArgs
{
BOOLEAN Verbose;
BOOLEAN WaitForDebugger;
BOOLEAN Reserved[6];
BOOLEAN Reserved[7];
WCHAR BinaryFilePath[MAX_PATH];
WCHAR CoreRootPath[MAX_PATH];
WCHAR CoreLibrariesPath[MAX_PATH];
Expand Down
1 change: 0 additions & 1 deletion tests/assembly-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ TEST(TestCoreCLRHost, TestDotNetAssemblyExecution) {
BinaryLoaderArgs binaryLoaderArgs = { 0 };
AssemblyFunctionCall assemblyFunctionCall = { 0 };
binaryLoaderArgs.Verbose = true;
binaryLoaderArgs.WaitForDebugger = false;
wcscpy_s(binaryLoaderArgs.BinaryFilePath, MAX_PATH, dotnetAssemblyName);

WCHAR coreCLRInstallPath[MAX_PATH];
Expand Down

0 comments on commit ca85d91

Please sign in to comment.