0

I am writing a small application that prints out the call stack of a given crash dump. The code is more or less base on this tutorial: http://blogs.msdn.com/b/joshpoley/archive/2008/05/27/opening-a-crash-dump-file-automating-crash-dump-analysis-part-1.aspx?Redirected=true

The code works fine when the debug symbol is alongside the crash dump. However my application can't find the debug symbol when it lives in a symbol server. My symbol server is specified in _NT_SYMBOL_PATH. I am pretty sure there is nothing wrong with _NT_SYMBOL_PATH and the symbol server because when I open the crash dump in Visual Studio and WinDbg, they are able to find the symbol in the symbol server.

I added the SYMOPT_DEBUG option to my instance of IDebugSymbols and I get the following output:

DBGHELP: _NT_SYMBOL_PATH:

srv*c:\localsymbols*my_symbol_server*http://msdl.microsoft.com/download/symbols

DBGHELP: Symbol Search Path:

.;srv*c:\localsymbols*my_symbol_server*http://msdl.microsoft.com/download/symbols

I guess that means that my instance of IDebugSymbols knows about the symbol server.

Does anyone have any idea of what I am doing wrong?

Thanks in advance.

4

1 回答 1

1

您应该获得 Windows 调试工具(现在来自 Windows 工具包)并使用其中的组件 dbgeng.dll、dbghelp.dll 和 symsrv.dll。操作系统在 System32 中有这些 dll 的标准版本,不幸的是它们的功能受到限制。例如,它们不支持 Windows 7 上的符号服务器。

可能你觉得我们的项目有用:

kdlibcpp
pykd - kdlibcpp 的 python 包装器

例如此代码打印出当前堆栈:

StackPtr  stk = getStack();
for ( int i = 0; i < stk->getFrameCount(); ++i )
    dprintln( findSymbol( stk->getFrame(i)->getIP() ) )
于 2014-04-13T17:24:21.173 回答