From: Pedro Alves <pedro@codesourcery.com>
To: tromey@redhat.com
Cc: gdb-patches@sourceware.org, Marc Khouzam <marc.khouzam@ericsson.com>
Subject: Re: Process exit in multi-process, and gdb's selected thread.
Date: Wed, 25 Mar 2009 21:46:00 -0000 [thread overview]
Message-ID: <200903252144.43357.pedro@codesourcery.com> (raw)
In-Reply-To: <m37i3flice.fsf@fleche.redhat.com>
On Tuesday 24 February 2009 19:56:17, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
>
> I meant to reply to this earlier...
>
Makes two of us now. :-)
> Pedro> What would you think if GDB could get into this state,
> Pedro> after a process exit? :
> Pedro> (gdb) info threads
> Pedro> 2 Thread 31176.31176 0x00007f0706154796 in ?? ()
> [...]
>
> I think it is a reasonable outcome given the model. If users find it
> too confusing, we can try to add some extra output somewhere -- for
> instance, when gdb says "The program is not being run.", it could
> check for multiple inferiors and print something about how to switch
> to another inferior.
>
> I tend to doubt that we will need to do this, though, because I think
> this is the most logical way for multi-inferior debugging to work.
>
> Pedro> In the past, I had solved this by spreading around some hacks
> Pedro> that tried to detect the current inferior exiting, and switching
> Pedro> to any other random live thread, but, that turned out to be: first,
> Pedro> surprising in non-stop mode, in the case mentioned above; and
> Pedro> second, surprisingly difficult to get right. I think this usually
> Pedro> means that GDB shouldn't try to be smart (well, or I shouldn't).
>
> I agree.
>
> Pedro> What do you think of all this, am I making sense?
>
> Yeah, I think your choices here make sense, particularly not having
> gdb switch contexts behind the user's back, and that what you wrote up
> is the logical outcome of this decision.
Great then. Since there were no objections to this, and Marc
has been using this patch against his multi-process aware system
for a while now without problems, I checked it in.
--
Pedro Alves
prev parent reply other threads:[~2009-03-25 21:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 3:12 Pedro Alves
2009-02-17 16:33 ` Marc Khouzam
2009-02-17 16:56 ` Pedro Alves
2009-02-17 18:15 ` Marc Khouzam
2009-02-17 19:08 ` Pedro Alves
2009-02-24 20:23 ` Tom Tromey
2009-03-25 21:46 ` Pedro Alves [this message]
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=200903252144.43357.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=marc.khouzam@ericsson.com \
--cc=tromey@redhat.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