nobs
nobs

Reputation: 730

Getting from memory address to function in source

with the tool Process Explorer I know that my process hangs at a special function myexe.exe+0x1b5773

is there a way to get to the exact function if I have the pdb available? Or must there be a .map file for this information?

I know I can attach to the exe with a debugger, but this is now always a option if the problem occures on a not developer machine..

Upvotes: 2

Views: 429

Answers (1)

Thomas Weller
Thomas Weller

Reputation: 59279

Process Explorer

This can be done in Process Explorer itself under Options|Configure symbols...:

  1. Choose dbghelp.dll
  2. Set the symbol path

    SRV*c:\debug\symbols*http://msdl.microsoft.com/download/symbols;c:\mysymbols
    

But this may not be very convenient for your customer.

A safer and typically more user friendly way:

  1. Right click the process
  2. Choose Create dump | Create Minidump...
  3. Select a file name
  4. Let the customer send you the dump so that you can analyze it.

With a dump, you can't do anything wrong and even weeks later, it can still be analyzed, which you can't in case of transient data just displayed by Process Explorer for a moment.

WinDbg

You can do it in WinDbg like this:

  1. open the executable in question but as a dump file
  2. .symfix
  3. .sympath+ <your PDB path>
  4. .reload
  5. ln myexe.exe+0x1b5773

Upvotes: 2

Related Questions