0

I built test.exe which will crash and generate .dmp file using MinidumpWriteDump, and parser.exe is used to read and print information from that dmp file.

In parser.exe I use StackWalk64 to get all stack traces of all threads in that dmp file. But now I found that I can only get less stacks than that visual studio did.

I've tried all solutions I could find in google、stackoverflow、codeproject, nothing changed.

The following is what parser.exe do:

  1. SymInitialize
  2. MiniDumpReadDumpStream to read all information
  3. SymLoadModuleEx & SymFindFileInPath to load pdb/exe/dll specified in .dmp file
  4. Initialize STACKFRAME64 and call StackWalk64 in loop.

I want to know how to get the same count of stack as visual studio. I could paste more code here if needed. Any help will be appreciated.

4

1 回答 1

1

StackWalk64 不够健壮,无法跟踪完整的堆栈跟踪,尤其是经过优化的帧。(例如,在此处查看此 stackoverflow 问题)。

最好的方法是实际使用随WinDbg提供的调试引擎。以下是一些展示如何使用调试引擎 API 的博客文章:

于 2013-08-17T21:16:25.700 回答