summaryrefslogtreecommitdiff
path: root/src/debug/ee/debugger.cpp
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-02-10 11:35:12 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-02-10 11:35:12 (GMT)
commit4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch)
treeb48831a898906734f8884d08b6e18f1144ee2b82 /src/debug/ee/debugger.cpp
parentdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff)
downloadcoreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.zip
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.gz
coreclr-4b11dc566a5bbfa1378d6266525c281b028abcc8.tar.bz2
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/debug/ee/debugger.cpp')
-rw-r--r--src/debug/ee/debugger.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp
index 2aed8bd..1f2126b 100644
--- a/src/debug/ee/debugger.cpp
+++ b/src/debug/ee/debugger.cpp
@@ -1898,7 +1898,7 @@ void Debugger::SendCreateProcess(DebuggerLockHolder * pDbgLockHolder)
#if defined(FEATURE_CORECLR) && !defined(FEATURE_PAL)
-HANDLE g_hContinueStartupEvent = NULL;
+HANDLE g_hContinueStartupEvent = INVALID_HANDLE_VALUE;
CLR_ENGINE_METRICS g_CLREngineMetrics = {
sizeof(CLR_ENGINE_METRICS),
@@ -1945,7 +1945,7 @@ void NotifyDebuggerOfTelestoStartup()
// enumeration of this process will get back a valid continue event
// the instant we signal the startup notification event.
- CONSISTENCY_CHECK(NULL == g_hContinueStartupEvent);
+ CONSISTENCY_CHECK(INVALID_HANDLE_VALUE == g_hContinueStartupEvent);
g_hContinueStartupEvent = WszCreateEvent(NULL, TRUE, FALSE, NULL);
CONSISTENCY_CHECK(INVALID_HANDLE_VALUE != g_hContinueStartupEvent); // we reserve this value for error conditions in EnumerateCLRs
@@ -2173,7 +2173,14 @@ HRESULT Debugger::Startup(void)
// Signal the debugger (via dbgshim) and wait until it is ready for us to
// continue. This needs to be outside the lock and after the transport is
// initialized.
- PAL_NotifyRuntimeStarted();
+ if (PAL_NotifyRuntimeStarted())
+ {
+ // The runtime was successfully launched and attached so mark it now
+ // so no notifications are missed especially the initial module load
+ // which would cause debuggers problems with reliable setting breakpoints
+ // in startup code or Main.
+ MarkDebuggerAttachedInternal();
+ }
#endif // FEATURE_PAL
// We don't bother changing this process's permission.