[Cygwin] Fix for: detaching crashes the inferior.
Pedro Alves
pedro_alves@portugalmail.pt
Sun Apr 8 11:37:00 GMT 2007
Hi all,
Detaching on Cygwin often crashes the inferior, either
when gdb attaches to the inferior, or when gdb launches
the inferior as a child.
Initially I thought that somehow the FLAGS_TRACE_BIT
would be set in the context, and after detaching there would
be no debugger to catch the exception, but it turns out that
it isn't the case - I couldn't find a case where FLAGS_TRACE_BIT
was set. But, surprisingly doing a SetThreadContext with
CONTEXT_CONTROL makes the crashes go away - even if you don't
change the contents of the context. I'm not 100% sure why, but,
it fixes it. If MSFT sends me the Windows sources, I'll look
deeper :)
No regressions on i686-pc-cygwin on XP Pro.
OK?
Cheers,
Pedro Alves
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32_detach.diff
Type: text/x-diff
Size: 1436 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20070408/72786237/attachment.bin>
More information about the Gdb-patches
mailing list