When I execute "~*k" command via ClrMd, it returns stack traces with clr!DllUnregisterServerInternal instead of correct values. It looks like symbols are not loaded. If I perform "~*k" command directly in WinDBG, everything looks well.
this.DataTarget = DataTarget.LoadCrashDump(pathToMemoryDump, CrashDumpReader.DbgEng);
this.DataTarget.SymbolLocator.SymbolCache = @"C:\symbols";
this.DataTarget.EnumerateModules().ToList().ForEach((m) =>
{
this.DataTarget.SymbolLocator.FindBinary(m);
this.DataTarget.SymbolLocator.FindPdb(m);
});
this.ClrRuntime = DataTarget.ClrVersions[0].CreateRuntime();
Then, I'm using Execute method to perform the query against loaded memory dump:
(IDebugControl)client.Execute(DEBUG_OUTCTL.ALL_CLIENTS, cmd, DEBUG_EXECUTE.DEFAULT);
Do anyone have any suggestion? My intention to get correct stack traces for native threads.
Set your symbol path