Tracing (catching) calls to DLL (module)
-
Hi, all. Does anyone know, if there is the way to catch when process being debugged call (directly or indirectly) any function from specified DLL? So the perfect thing for me, if VS could break when the execution enters the specified DLL address space. It would be perfect, if I could see the call stack (surely, I don't expect the function names for modules without debug info). Background: We are developing plugins for the complex application, that already contains a lot of code. I get weird behavior with CUDA. So want to check if some of the code is calling any of CUDA functions before me. Regards, Ivan
-
Hi, all. Does anyone know, if there is the way to catch when process being debugged call (directly or indirectly) any function from specified DLL? So the perfect thing for me, if VS could break when the execution enters the specified DLL address space. It would be perfect, if I could see the call stack (surely, I don't expect the function names for modules without debug info). Background: We are developing plugins for the complex application, that already contains a lot of code. I get weird behavior with CUDA. So want to check if some of the code is calling any of CUDA functions before me. Regards, Ivan
If you have the DLL source, it's easy, just place a breakpoint in any of the entry functions within the DLL and see when it's getting called. You don't have to have the source for the executable, just need to tell VisualStudio what exe will be loading your dll. If you don't have the exe or the dll code, I don't believe there's anyway of telling when the executable is making those calls (other than reverse engineering the executable).