how do I specify the source code directory in VS when looking at the call stack of a memory dump?
Asked Answered
E

4

6

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.

Erdman answered 3/10, 2008 at 4:35 Comment(0)
N
3

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

Nunci answered 3/10, 2008 at 6:1 Comment(0)
E
3

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.

Er answered 4/10, 2008 at 3:34 Comment(0)
E
2

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

Epigraphy answered 12/8, 2009 at 9:16 Comment(0)
A
0

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.

Aboutship answered 3/10, 2008 at 5:59 Comment(2)
It is not smart enough. Tested (at least in VS2005)Subsonic
Bummer. The SDK debuggers (ntsd/cdb/windbg) are smart enough.Aboutship

© 2022 - 2024 — McMap. All rights reserved.