示例#1
0
 int IDiaStackWalkHelper.symbolForVA(ulong va, out IDiaSymbol?ppSymbol)
 {
     ppSymbol = Resolver.FindFunctionAtAddr((IntPtr)va);
     if (ppSymbol == null)
     {
         return(S_FALSE);
     }
     return(S_OK);
 }
示例#2
0
        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();
                }
            }
        }