int IDiaStackWalkHelper.symbolForVA(ulong va, out IDiaSymbol?ppSymbol) { ppSymbol = Resolver.FindFunctionAtAddr((IntPtr)va); if (ppSymbol == null) { return(S_FALSE); } return(S_OK); }
private void DumpThread(ThreadEntry threadEntry) { using (NativeThread thread = threadEntry.Open(ThreadAcccessRights.GetContext | ThreadAcccessRights.SuspendResume | ThreadAcccessRights.QueryInformation)) { walker = new StackWalker(thread, memoryReader, resolver); try { thread.Suspend(); var stack = walker.Walk(); foreach (var frame in stack) { var fun = resolver.FindFunctionAtAddr((IntPtr)frame.returnAddress); Console.WriteLine($"{fun.name} {fun.virtualAddress-frame.returnAddress}"); } } finally { thread.Resume(); } } }