Fix loading symbols on attach
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Sat, 22 Jul 2017 19:00:04 +0000 (22:00 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Mon, 13 Nov 2017 19:22:40 +0000 (22:22 +0300)
src/debug/netcoredbg/main.cpp

index 85d7150..5bd1062 100644 (file)
@@ -815,6 +815,11 @@ HRESULT Debugger::Startup(IUnknown *punk, int pid)
         return Status;
     }
 
+    if (m_clrPath.empty())
+        m_clrPath = GetCLRPath(pid);
+
+    SymbolReader::SetCoreCLRPath(m_clrPath);
+
     ToRelease<ICorDebugProcess> pProcess;
     Status = pCorDebug->DebugActiveProcess(pid, FALSE, &pProcess);
     if (FAILED(Status))
@@ -827,10 +832,6 @@ HRESULT Debugger::Startup(IUnknown *punk, int pid)
     m_pDebug = pCorDebug.Detach();
 
     m_processId = pid;
-    if (m_clrPath.empty())
-        m_clrPath = GetCLRPath(pid);
-
-    SymbolReader::SetCoreCLRPath(m_clrPath);
 
     return S_OK;
 }