make attaching to stopped processes work under windows

Oswald Buddenhagen oswald.buddenhagen@trolltech.de
Mon Mar 9 20:51:00 GMT 2009


On Sun, Mar 08, 2009 at 03:32:33PM -0400, Christopher Faylor wrote:
> On Tue, Mar 03, 2009 at 01:05:04PM +0100, Oswald Buddenhagen wrote:
> >after all, why should it matter
> >whether the process is suspended in the first place?
> 
> Because you may be debugging a situation where you want precise control
> over the process's suspend count.  The process may be suspended for
> reasons other than the way that you are specifically using it.
> 
the bad news is that gdb simply hangs without my patch, so your
situation is rather hypothetical.
i guess the right fix (if at all possible) would be making it not hang
and resume the thread from the outside once gdb reports success. but
investigating that is way beyond what my employer is likely willing to
pay for.
if you feel like debugging it, just compile the attachment and run it
like

  process_stub_win debug <somefile> "" "" notepad "press enter..."

then read the pid from <somefile> and use it to attach gdb.

> This would mean that you'd need to have an assignment on file with the
> FSF so if you are willing to pursue that alternative it would make
> sense to start that process ASAP.
> 
i'm covered, the process is rolling (or rather, crawling uphill) for a
few months now ...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: process_stub_win.c
Type: text/x-csrc
Size: 6666 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090309/dc1a20bf/attachment.bin>


More information about the Gdb-patches mailing list