views:

97

answers:

2

I have a winxp process which has all sorts of dlls and static libs. One of our libs is calling ms debug dlls, I have a suspicion which one it is but want to prove it in a tool like Process Explorer. How can I get a tree of my process, to see exactly who is loading what modules?

+7  A: 

You can use tools like Dependency Walker

IPX Ares
Looks cool, I'll have to try it out. Does it happen to work on .libs?
Marsh Ray
Honestly, I have not tried so I am not sure.
IPX Ares
Here is a lib viewer I use http://www.codeproject.com/KB/debug/LibView.aspx
iain
Dependency Walker has both a static analysis mode and a dynamic analysis mode. The static is easier to use but does not pick up calls to LoadLibrary which the dynamic does.
Stephen Nutt
+5  A: 

Two tools that ship with MS Visual Studio:

Depends.exe for your .exes and .dlls will tell you exactly what the load-time dependencies are.

Run dumpbin /directives on .lib files to tell you what linker directives the static libraries are passing to the linker. This will reveal dependencies coming from there. This comes with the Windows SDK "PSDK", and can also be used to get load-time deps.

If things are getting loaded at runtime, set a breakpoint on kernel32!LoadLibrary and examine the call stack when it gets triggered. The WinDbg debugger (MS Debugging Tools for Windows) is good for this.

Marsh Ray