[PATCH] Fix debugger attach for threads
Thomas Pfaff
tpfaff@gmx.net
Tue Nov 4 08:41:00 GMT 2003
Christopher Faylor wrote:
> On Fri, Oct 31, 2003 at 10:11:46PM +0100, Thomas Pfaff wrote:
>
>>This patch allows a debugger to attach when an exception occurs in a
>>thread other than the mainthread.
>>
>>I am not happy about the wait in handle_exceptions, but it works on my
>>machine. I think that a waitloop until the debugger is attached is
>>cleaner, but there must be a reason why the debbugging loop is
>>implemented this way.
>
>
> The intent is for an attached debugger to immediately see the location
> that died. If you loop in the try_to_debug code then it is a pain to
> figure out exactly where the exception occurred.
>
I never see immediately the location, i must always continue the program
to get it.
Anyway, attached is new attempt that does not make use of
Suspend/ResumeThread and keeps the process running until the debugger is
attached.
2003-11-04 Thomas Pfaff <tpfaff@gmx.net>
* exceptions.cc (handle_exceptions): Keep process running when
debugger is attaching. Give debugger CPU time to attach.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: handle_exceptions.patch
Type: plain/text
Size: 755 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20031104/5ff0a1cc/attachment.bin>
More information about the Cygwin-patches
mailing list