debug dll

debug dll

Post by amVld » Thu, 31 Aug 2006 21:10:02


Hi,
I wanted to debug a dll (say A). But the API that is exported is called by
another dll (say B). I wanted to debug this api and i cant call this (dll
A)api directly in some other application to debug because a lot of dependecy
is there and morover some other dlls are supposed to be loaded. Is there any
way out so that i can debug the dll hooking to any other dll.

thanx and regards
 
 
 

debug dll

Post by William De » Thu, 31 Aug 2006 23:48:31


With a standard de *** , you can only debug one process at a time. Hooks
mostly execute in the context of the processes whose events they hook. That
can be a show-stopper.

That said, assuming that you have the source to the troublesome DLL and that
you can start the executable that loads it under the de *** you can try
inserting a call to DebugBreak() in the DLL.

Regards,
Will

 
 
 

debug dll

Post by neeraj.lad » Fri, 01 Sep 2006 18:33:09

you can try these steps


1 )You can put a message box before just calling the API
2) Build the debug version , once you run it as soon as you get the
message box ,
3) go to visual studio -<tools->debug process and select the messagebox
process ..,
4)you can go to source and put a breakpoint after the messagebox ,
5) now press ok to debug prrocess dialog ,

let me know if it works
 
 
 

debug dll

Post by Marc Sherm » Fri, 01 Sep 2006 22:53:29


With the windbg de *** you can cause it to break when dll A is loaded. You
can then set breakpoints in dll A and resume execution. When any other
module calls into dll A (eg. dll B) your breakpoints in dll A will be hit
and you can then debug dll A.


Not sure what you mean here.

Marc