@@ -3893,27 +3893,31 @@ ISymUnmanagedReader *Module::GetISymUnmanagedReader(void)
3893
3893
// We've got in-memory ILDB symbols, create the ILDB symbol binder
3894
3894
// Note that in this case, we must be very careful not to use diasymreader.dll
3895
3895
// at all - we don't trust it, and shouldn't run any code in it
3896
- IfFailThrow (IldbSymbolsCreateInstance (CLSID_CorSymBinder_SxS,
3897
- IID_ISymUnmanagedBinder,
3898
- (void **)&pBinder));
3896
+ IfFailThrow (IldbSymbolsCreateInstance (CLSID_CorSymBinder_SxS, IID_ISymUnmanagedBinder, (void **)&pBinder));
3899
3897
}
3900
3898
else
3901
3899
{
3902
- // We're going to be working with PDB format symbols
3903
- // Attempt to coCreate the symbol binder.
3904
- // CoreCLR supports not having a symbol reader installed, so this is expected there .
3900
+ // We're going to be working with Windows PDB format symbols. Attempt to CoCreate the symbol binder.
3901
+ // CoreCLR supports not having a symbol reader installed, so CoCreate searches the PATH env var
3902
+ // and then tries coreclr dll location .
3905
3903
// On desktop, the framework installer is supposed to install diasymreader.dll as well
3906
3904
// and so this shouldn't happen.
3907
- hr = FakeCoCreateInstanceEx (CLSID_CorSymBinder_SxS,
3908
- NATIVE_SYMBOL_READER_DLL,
3909
- IID_ISymUnmanagedBinder,
3910
- (void **)&pBinder,
3911
- NULL );
3905
+ hr = FakeCoCreateInstanceEx (CLSID_CorSymBinder_SxS, NATIVE_SYMBOL_READER_DLL, IID_ISymUnmanagedBinder, (void **)&pBinder, NULL );
3912
3906
if (FAILED (hr))
3913
3907
{
3914
- RETURN (NULL );
3908
+ PathString symbolReaderPath;
3909
+ hr = GetHModuleDirectory (GetModuleInst (), symbolReaderPath);
3910
+ if (FAILED (hr))
3911
+ {
3912
+ RETURN (NULL );
3913
+ }
3914
+ symbolReaderPath.Append (NATIVE_SYMBOL_READER_DLL);
3915
+ hr = FakeCoCreateInstanceEx (CLSID_CorSymBinder_SxS, symbolReaderPath.GetUnicode (), IID_ISymUnmanagedBinder, (void **)&pBinder, NULL );
3916
+ if (FAILED (hr))
3917
+ {
3918
+ RETURN (NULL );
3919
+ }
3915
3920
}
3916
-
3917
3921
}
3918
3922
3919
3923
LOG ((LF_CORDB, LL_INFO10, " M::GISUR: Created binder\n " ));
0 commit comments