From: Doug Evans <dje@google.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Don't kill inferior if there's a typo in the specified port.
Date: Mon, 13 Apr 2009 18:49:00 -0000 [thread overview]
Message-ID: <e394668d0904131149q3dd7bd64jd1606c9388fadc1e@mail.gmail.com> (raw)
In-Reply-To: <200904111604.05252.pedro@codesourcery.com>
On Sat, Apr 11, 2009 at 8:04 AM, Pedro Alves <pedro@codesourcery.com> wrote:
>> It also moves the status message to the callback;
>> it's only called when exiting gdb (and if that changes one can split
>> the function into silent/verbose versions).
>> An alternative is something like this:
>>
>> - fprintf (stderr, "Killing all inferiors\n");
>> + fprintf (stderr, "Detaching or killing all inferiors\n");
>>
>> but will that be confusing?
>
> Perhaps:
>
> "Detaching from inferiors we had attached to, and killing all others\n"
>
> dunno, don't want to start a bikeshed-ish discussion on that.
>
>> OTOH, if gdbserver ever gets used with 10's or 100's of processes,
>> exiting with one line per process may be a bit much.
>> OTOOH, the user might like to know what got detached and what got killed.
>> I don't know, but I can change the patch to do whatever y'all prefer.
>
> Yeah. If this is a real problem, then we could output something like,
>
> Killing process(es) PID1, PID2, PID3, PID4, PIDnn.
> Detaching process(es) PID1, PID2, PID3, PID4, PIDnn.
>
> This should mitigate the problem, although if you're really attached to
> 100's of processes, it will still print a lot.
>
> The other thing that crossed my mind was that if you had a bunch
> of processes, the real error message that let to gdbserver bailing out
> would be buried in the output many lines before all those
> "Killing/detaching process X". The only version that doesn't
> have this problem is the one that doesn't include any detail, like
> the first option.
One reason why I like printing which processes were detached from and
which were killed is: What happens if the process is gone shortly
after gdbserver exits? Did gdbserver kill it, or did the detach screw
up, or did the program crash on its own shortly after gdbserver
detached? Tracking this down will be a pain without this info. One
could add a verbose option to print such info I guess, but it might
cut down on support costs if this info was always printed.
>
> Anyway, I've no real inclination for any of these possible
> outputs.
>
>> Ok to check in?
>
> This is fine with me. Let's give it a few days in case Daniel or
> others want to comment.
>
> Thanks for documenting detach_or_kill_inferior_callback, btw ;-).
>
> --
> Pedro Alves
>
next prev parent reply other threads:[~2009-04-13 18:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 23:18 Doug Evans
2009-04-11 15:03 ` Pedro Alves
2009-04-13 18:49 ` Doug Evans [this message]
2009-04-30 21:51 ` Doug Evans
2009-04-30 22:16 ` Pedro Alves
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=e394668d0904131149q3dd7bd64jd1606c9388fadc1e@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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