The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Gustav on February 19, 2006, 11:05:49 AM

Title: How to catch the dll entry point with WinDbg?
Post by: Gustav on February 19, 2006, 11:05:49 AM

Hello,

I want to debug an application which uses a dll (vim.exe + msys-1.0.dll) and want WinDbg to stop at the dll entry point. It seems impossible or am I missing something?

If WinDbg can't do that, which debugger can do? Without having to add a breakpoint in the msys sources and have to compile them!

Regards

Gustav


Title: Re: How to catch the dll entry point with WinDbg?
Post by: Gustav on February 19, 2006, 11:33:49 AM

I managed to find the solution
Title: Re: How to catch the dll entry point with WinDbg?
Post by: sluggy on February 20, 2006, 11:56:57 AM
Quote from: Gustav on February 19, 2006, 11:33:49 AM

I managed to find the solution

You should mention what the solution was - your information may help someone in the future when they are trying to use google or the board search to find the answer.
Title: Re: How to catch the dll entry point with WinDbg?
Post by: Mincho Georgiev on February 20, 2006, 12:56:25 PM
WinDbg is mutch mutch more than it looks like. I remember that my first impression was "pfu ,what an awfully interface",.But couple of hourse after that i'd realized that i'm working with the powerfull source level debugger for windows that i ever seen /after SoftIce and Visual studio8's debugging environment/.
The finding of entry point is just one of it's features, you can use the cmd line of the debugger to passing arguments, declaring condition, and mutch more.
I like alot the ability of windbg to watching the memory location of a variable and how is changing. With the symbols that are provided by microsoft for the entire system  you can debug everything.
If you want to debug dll is very easy - it's enought to open the source file of the dll, then open executable that use that dll, setting a breakpoint in the dll's source and run the executable.
Title: Re: How to catch the dll entry point with WinDbg?
Post by: Gustav on February 20, 2006, 05:23:14 PM

> You should mention what the solution was

I use WinDbg v6.4. It allows to set event filters. I told the debugger to enable and handle event "Load Module". With this approach you dont need any source file.