private string GetDacFileName()
{
- Debug.Assert(!string.IsNullOrEmpty(_clrInfo.DacInfo.PlatformSpecificFileName));
- string name = _clrInfo.DacInfo.PlatformSpecificFileName;
-
- // If this is the Linux runtime module name, but we are running on Windows return the cross-OS DAC name.
- if (_target.OperatingSystem == OSPlatform.Linux && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- {
- name = "mscordaccore.dll";
- }
- return name;
+ return ClrInfoProvider.GetDacFileName(_clrInfo.Flavor, _target.OperatingSystem);
}
private string GetLocalDacPath(string dacFileName)
WriteLine(" IsPEImage: {0}", module.IsPEImage);
WriteLine(" IsManaged: {0}", module.IsManaged);
WriteLine(" IsFileLayout: {0}", module.IsFileLayout?.ToString() ?? "<unknown>");
- WriteLine(" IndexFileSize: {0:X8}", module.IndexFileSize?.ToString() ?? "<none>");
- WriteLine(" IndexTimeStamp: {0:X8}", module.IndexTimeStamp?.ToString() ?? "<none>");
+ WriteLine(" IndexFileSize: {0}", module.IndexFileSize?.ToString("X8") ?? "<none>");
+ WriteLine(" IndexTimeStamp: {0}", module.IndexTimeStamp?.ToString("X8") ?? "<none>");
WriteLine(" Version: {0}", module.Version?.ToString() ?? "<none>");
string versionString = module.VersionString;
if (!string.IsNullOrEmpty(versionString)) {
/// Checks availability of debugging information for given assembly.
/// </summary>
/// <param name="assemblyPath">
- /// File path of the assembly or null if the module is in-memory or dynamic (generated by Reflection.Emit)
+ /// File path of the assembly or null
/// </param>
/// <param name="isFileLayout">type of in-memory PE layout, if true, file based layout otherwise, loaded layout</param>
/// <param name="loadedPeAddress">
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
private delegate IntPtr LoadSymbolsForModuleDelegate(
[In] IntPtr self,
- [In] string assemblyPath,
+ [In, MarshalAs(UnmanagedType.LPWStr)] string assemblyPath,
[In] bool isFileLayout,
[In] ulong loadedPeAddress,
[In] uint loadedPeSize,
HRESULT Status = S_OK;
IfFailRet(InitializeSymbolService());
- // The module name needs to be null for in-memory PE's.
- ArrayHolder<char> szModuleName = nullptr;
- if (!isInMemory && pModuleName != nullptr)
- {
- szModuleName = new char[MAX_LONGPATH];
- if (WideCharToMultiByte(CP_ACP, 0, pModuleName, (int)(_wcslen(pModuleName) + 1), szModuleName, MAX_LONGPATH, NULL, NULL) == 0)
- {
- return E_FAIL;
- }
- }
-
m_symbolReaderHandle = GetSymbolService()->LoadSymbolsForModule(
- szModuleName, isFileLayout, peAddress, (int)peSize, inMemoryPdbAddress, (int)inMemoryPdbSize);
+ pModuleName, isFileLayout, peAddress, (int)peSize, inMemoryPdbAddress, (int)inMemoryPdbSize);
if (m_symbolReaderHandle == 0)
{
const unsigned char* moduleIndex) = 0;
virtual PVOID STDMETHODCALLTYPE LoadSymbolsForModule(
- const char*,
+ LPCWSTR,
BOOL,
ULONG64,
int,