Question

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.

Was it helpful?

Solution

You should get windows debugging tools ( from Windows Kits now ) and use components dbgeng.dll, dbghelp.dll and symsrv.dll from it. OS has standard version of these dll in System32 and unfortunately they has restricted functions. For example they dont support symbol servers on windows 7.

may be you find our projects usefull:

kdlibcpp
pykd - python wrapper for kdlibcpp

For example this code print out current stack:

StackPtr  stk = getStack();
for ( int i = 0; i < stk->getFrameCount(); ++i )
    dprintln( findSymbol( stk->getFrame(i)->getIP() ) )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top