This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb and Dll
- From: Christopher Faylor <cgf at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 27 Nov 2002 19:52:42 -0500
- Subject: Re: gdb and Dll
- References: <001301c295f5$461850c0$fe78a8c0@SOL>
On Wed, Nov 27, 2002 at 10:13:28AM +0100, Heiko Gerdau wrote:
>Hi,
>
>i found quit a few questions about debugging relocatable dlls on
>Windows, but no answers. Does that mean you can not debug dlls with gdb?
I debug dlls all of the time.
>I found the gdb command "dll-symbols" which seems to be made for this
>purpose. But at least for me, using the mingw version of gdb 5.2.1, it
>seems to have no effects. Is there anybody on this list who could give
>me a hint or confirmation that is it not possible to debug dlls with
>gdb.
AFAIK, the "mingw version" is a modified, unsupported version of gdb.
Certainly simple debugging of dlls with the cygwin version of gdb work
ok, especially in the current cvs revision or, presumably, in the
upcoming gdb 5.3.
There is one long-standing "gotcha" in debugging dlls however. Currently
you can only set breakpoints on line numbers not on symbol names if the
dll is not loaded. That is you can't do:
dll-symbols foo.dll
bp foo
You have to, instead do:
dll-symbols foo.dll
list foo
bp <first line of foo>
cgf