5

Has anyone figured out how the Very Sleepy profiler finds PDB files? It seems like it doesn't use the _NT_SYMBOL_PATH env variable.. I've had success by putting PDBs in the same directory as the executable and DLLs, but I'm trying to profile a program that uses a TON of DLLs and it's getting really painful. Isn't there some way to have it point to a symbol server?

pepsi
  • 6,785
  • 6
  • 42
  • 74
  • Quick note. I had the same issue but very sleepy could find the pdb's for the dlls in the local directory but not the exe's pdb. I hacked it to work by mimicking the build directory on our test machine so that the absolute path in the exe resolved to the pdb. – SargeATM Jun 02 '11 at 15:02

1 Answers1

7

The path to the original .pdb file is getting included in the DLL. Just don't move them.

The source code for Very Sleepy is readily available. It uses the DbgHelp API, symbolinfo.cpp source code file. The call to SymInitialize() allows a tool to specify the the search path for symbols, 2nd argument. It passes NULL, that's where the buck stops.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Thanks Hans. I figured that first point, but the problem is that I'm not profiling on the same machine that built the DLL. – pepsi May 18 '11 at 22:12
  • Weird. According to MSDN (http://msdn.microsoft.com/en-us/library/ms681351(v=vs.85).aspx) passing NULL to SymInitialize() causes the library to look in the _NT_SYMBOL_PATH env var. I'm not sure why it doesn't seem to be doing that though. – pepsi May 18 '11 at 22:18
  • 1
    Tip: If you use process explorer, you can view all the strings in the .dll or .exe. One of those strings will be the full path to the original PDB file; just search for '.pdb' and it should show up. Then you can create an equivalent folder on your PC to put the symbols in – Orion Edwards Mar 20 '13 at 03:58