summaryrefslogtreecommitdiff
path: root/src/vm/ceeload.cpp
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2017-10-25 16:31:42 -0700
committerGitHub <noreply@github.com>2017-10-25 16:31:42 -0700
commit641c1a8cff555941a796ab9cdc3fa7c69ed9cc62 (patch)
tree0ad26b0096e1742d2edc00601fc29c1575e5cbd2 /src/vm/ceeload.cpp
parente90e9d3208aed1c77ee215a221dee947b61be66d (diff)
downloadcoreclr-641c1a8cff555941a796ab9cdc3fa7c69ed9cc62.tar.gz
coreclr-641c1a8cff555941a796ab9cdc3fa7c69ed9cc62.tar.bz2
coreclr-641c1a8cff555941a796ab9cdc3fa7c69ed9cc62.zip
Fix source/line info on Windows for Windows PDBs. (#14696)
Now attempts to load the diasymreader from the coreclr module path. Issue #21079
Diffstat (limited to 'src/vm/ceeload.cpp')
-rw-r--r--src/vm/ceeload.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp
index f5173196e3..504bf799ac 100644
--- a/src/vm/ceeload.cpp
+++ b/src/vm/ceeload.cpp
@@ -3796,27 +3796,31 @@ ISymUnmanagedReader *Module::GetISymUnmanagedReader(void)
// We've got in-memory ILDB symbols, create the ILDB symbol binder
// Note that in this case, we must be very careful not to use diasymreader.dll
// at all - we don't trust it, and shouldn't run any code in it
- IfFailThrow(IldbSymbolsCreateInstance(CLSID_CorSymBinder_SxS,
- IID_ISymUnmanagedBinder,
- (void**)&pBinder));
+ IfFailThrow(IldbSymbolsCreateInstance(CLSID_CorSymBinder_SxS, IID_ISymUnmanagedBinder, (void**)&pBinder));
}
else
{
- // We're going to be working with PDB format symbols
- // Attempt to coCreate the symbol binder.
- // CoreCLR supports not having a symbol reader installed, so this is expected there.
+ // We're going to be working with Windows PDB format symbols. Attempt to CoCreate the symbol binder.
+ // CoreCLR supports not having a symbol reader installed, so CoCreate searches the PATH env var
+ // and then tries coreclr dll location.
// On desktop, the framework installer is supposed to install diasymreader.dll as well
// and so this shouldn't happen.
- hr = FakeCoCreateInstanceEx(CLSID_CorSymBinder_SxS,
- NATIVE_SYMBOL_READER_DLL,
- IID_ISymUnmanagedBinder,
- (void**)&pBinder,
- NULL);
+ hr = FakeCoCreateInstanceEx(CLSID_CorSymBinder_SxS, NATIVE_SYMBOL_READER_DLL, IID_ISymUnmanagedBinder, (void**)&pBinder, NULL);
if (FAILED(hr))
{
- RETURN (NULL);
+ PathString symbolReaderPath;
+ hr = GetHModuleDirectory(GetModuleInst(), symbolReaderPath);
+ if (FAILED(hr))
+ {
+ RETURN (NULL);
+ }
+ symbolReaderPath.Append(NATIVE_SYMBOL_READER_DLL);
+ hr = FakeCoCreateInstanceEx(CLSID_CorSymBinder_SxS, symbolReaderPath.GetUnicode(), IID_ISymUnmanagedBinder, (void**)&pBinder, NULL);
+ if (FAILED(hr))
+ {
+ RETURN (NULL);
+ }
}
-
}
LOG((LF_CORDB, LL_INFO10, "M::GISUR: Created binder\n"));