From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: gdb-patches@sourceware.org,
Oswald Buddenhagen <oswald.buddenhagen@trolltech.de>
Subject: Re: make attaching to stopped processes work under windows
Date: Sun, 08 Mar 2009 19:32:00 -0000 [thread overview]
Message-ID: <20090308193233.GA6438@ednor.casa.cgf.cx> (raw)
In-Reply-To: <20090303120504.GA18244@troll08.nokia.trolltech.de>
On Tue, Mar 03, 2009 at 01:05:04PM +0100, Oswald Buddenhagen wrote:
>On Tue, Mar 03, 2009 at 12:21:30AM -0500, Christopher Faylor wrote:
>>In my definition of "use case", you don't just theorize that something
>>could be done, you explain that "Package X does this all of the time
>>because of Y and that makes it hard for me to debug things." You don't
>>just assert that you want to change the code because it is
>>theoretically possible.
>>
>well, to me, the idea of being able to attach to a suspended process
>seems to have enough merit of its own. 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.
For instance, if this code was invoked at the wrong time on a cygwin
process it could screw up cygwin's signal handling which tries to (very
carefully) use SuspendThread/SetThreadContext/ResumeThread to send
signals when running in user code.
>anyway, i use that to implement a "debug in separate terminal" mode.
>for that, i launch a stub with controlled process flags. that stub
>launches the debuggee. for gdb to be able to attach to it without a
>race, the debuggee needs to be launched in suspended state. once the
>debuggee ends, the stub prints a "enter to continue" message, waits and
>terminates.
Thank you for explaining.
Unfortunately, I am not comfortable accepting this patch as is. I would
consider a variation of the patch which implemented either a command line
option (assuming that the rest of the gdb developers agree) or a gdb
command ("set always-resume-thread on"?) so that this behavior was not
the default, however.
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 hoping that someone will provide you with a pointer to the necessary
paperwork since I don't have it handy right now)
cgf
next prev parent reply other threads:[~2009-03-08 19:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 15:04 Oswald Buddenhagen
2009-02-28 7:15 ` Christopher Faylor
2009-03-02 10:07 ` Oswald Buddenhagen
2009-03-02 17:23 ` Joel Brobecker
2009-03-02 18:28 ` Oswald Buddenhagen
2009-03-02 19:18 ` Eli Zaretskii
2009-03-02 19:55 ` Oswald Buddenhagen
2009-03-02 21:21 ` Eli Zaretskii
2009-03-03 5:21 ` Christopher Faylor
2009-03-03 12:05 ` Oswald Buddenhagen
2009-03-08 19:32 ` Christopher Faylor [this message]
2009-03-09 18:45 ` Joel Brobecker
2009-03-09 20:51 ` Oswald Buddenhagen
2009-03-10 8:52 ` Christopher Faylor
2009-03-10 13:37 ` Oswald Buddenhagen
2009-03-03 5:41 ` Christopher Faylor
2009-03-02 19:14 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090308193233.GA6438@ednor.casa.cgf.cx \
--to=cgf-use-the-mailinglist-please@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=oswald.buddenhagen@trolltech.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox