Mail Archives: cygwin-developers/1998/10/28/15:04:48
On Wed, Oct 28, 1998 at 04:26:12PM -0600, Mumit Khan wrote:
>Christopher Faylor <cgf AT cygnus DOT com> writes:
>>
>> Don't know if this will work, but:
>>
>> gdb /wherever/cygwin1.dll
>> exec-file prog
>> b whatever
>> r
>
>Nope. Actually, I don't think this is even meant to work because gdb has
>no way of mapping the address of the symbol before the DLL is loaded.
>
>Wonder if gdb should somehow load a DLL so that it's mapped and ready to
>be stepped into ...
>
>Thanks for the suggestion though ... I've made do with small_printf in
>the meantime, but it makes for some very tedious debugging job.
One thing you could do that might work is to debug the program after it
has started running. I have some patches to gdb which will allow attach
to work, and Sergey has a binary (which was independently developed) on
his web site.
If you insert a Sleep in something like dll_crt0_1 then quickly attach
to the running process, it's possible that the Windows debug API will
detect the fact that the cygwin DLL is loaded and "do the right thing".
--
cgf AT cygnus DOT com
http://www.cygnus.com/
- Raw text -