views:

238

answers:

2

Is there a way from WinDbg, without using the DbgEng API, to display the symbol server paths (i.e. PdbSig70 and PdbAge) for all loaded modules?

I know that

lml

does this for the modules whose symbols have loaded. I would like to know these paths for the symbols that did not load so as to diagnose the problem. Anyone know if this is possible without having to utilize the DbgEng API?

edited:

I also realize that you can use

!sym noisy

to get error messages about symbols loading. While this does have helpful output it is interleaved with other output that I want and is not simple and clear like 'lml'

+1  A: 

!sym noisy and !sym quiet can turn on additional output for symbol loading, i.e.:

!sym noisy
.reload <dll>
X <some symbol in that DLL to cause a load>
!sym quiet

When the debugger attempts to load the PDB you will see every path that it tries to load and if PDB's weren't found or were rejected.

Michael
Yes, but this gets the information in a roundabout manner and it requires a lot of parsing to extract the desired information, especially when a large number of modules are loaded.
Carlos Rendon
+1  A: 

To my knowledge there's no ready solution in windbg. Your options would be to either write a nifty script or an extension dependent on where you're the fittest.

It is pretty doable within windbg as a script. The information you're after is described in the PE debug directory.

Here's a link to the c++ sample code that goes into detail on extracting useful information (like the name of the symbol file in your case). Adapting it to windbg script should be no sweat.

Here's another useful pointer with tons of information on automating windbg. In particular, it talks about ways of passing arguments to windbg scripts (which is useful in your case as well, to have a common debug info extraction code which you can invoke from within the loaded modules iteration loop).

Thanks for the links, I will have to study code, but at a glance it looks useful
Carlos Rendon

related questions