views:

292

answers:

4

I am analyzing a .dmp file that was created and I have a call stack which gives me a lot of info. But I'd like to double click on the call stack and have it bring me to the source code.

I can right click on the call stack and select symbol settings.. where I can put the location to the PDB. But there is no option for the source code directory.

A: 

After loading the PDB, manually navigate to the source file that matches the current execution location. A PDB contains the path and filename of the source files that built its associated binary, and I suspect the debugger is smart enough to hook things up when it notices that the filename being displayed and the filename associated with with current binary location, match.

Bruce
+2  A: 

The source code directory is unfortunately hard coded into the pdb's however if you know the folders required you can use windows concept of symbolic links, junctions.

I use the tool Junction Link Magic

JProgrammer
+1  A: 

Read this article about how to set up a Source Server (aka SrcSrv) integration at your site.

I took the time to follow these steps for our codebase, and now we are able to take a .dmp file from any build of our software in the past 6 months... get a stack trace with symbols... and view the exact source code lines in the debugger. Since the steps are integrated into our automated builds, there's very little overhead now.

I did need to write a custom indexer for ClearCase, but they have pre-existing ones for Perforce, TFS, and maybe others.

It is worth noting that the .dmp support in VS2005 is a little shaky.. it's quite a bit more stable in VS2008.

You'll also need to configure Visual Studio to grab the symbols for the MS products from here in addition to your own symbol server:

http://msdl.microsoft.com/download/symbols

That is described in a few places such as on the Debugging Tools for Windows site.

Andy Stevenson
+1  A: 

Windbg allows you to setup source paths same as PDB's paths.

Tal