From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, gdb-patches@sourceware.org
Subject: Re: RFC: fix crash when inferior exits during "continue"
Date: Thu, 16 Feb 2012 12:45:00 -0000 [thread overview]
Message-ID: <4F3CEC0E.4070603@redhat.com> (raw)
In-Reply-To: <87d39fn9cq.fsf@fleche.redhat.com>
On 02/15/2012 08:13 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> Pedro> and the current thread disappears while the user is typing,
> Pedro> the command ends up being applied to a random thread, which is
> Pedro> not good.
>
> This makes sense to me if the user entered a background command.
> But why not switch if the last command was a foreground command?
Yes, agreed. The lame reason is that the original non-stop work didn't
care that much about the CLI (and there's no foreground in MI), and I
have an old TODO item for that, that I never got around to. :-P
> What do you think of the appended?
> diff --git a/gdb/testsuite/gdb.base/inferior-died.c b/gdb/testsuite/gdb.base/inferior-died.c
> new file mode 100644
> index 0000000..66227cf
> --- /dev/null
> +++ b/gdb/testsuite/gdb.base/inferior-died.c
> +#include <stdio.h>
Doesn't look necessary.
> static void
> @@ -1095,6 +1096,8 @@ do_restore_current_thread_cleanup (void *arg)
> set_current_inferior (find_inferior_id (old->inf_id));
> }
>
> + current_inferior ()->removable = old->was_removable;
This is unnecessary. restore_current_thread_cleanup_dtor
is called when either you run or discard the cleanup.
Otherwise looks good. Thanks.
--
Pedro Alves
next prev parent reply other threads:[~2012-02-16 11:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-07 19:14 Tom Tromey
2012-02-10 14:41 ` Jan Kratochvil
2012-02-10 20:05 ` Tom Tromey
2012-02-14 13:44 ` Gary Benson
2012-02-14 14:19 ` Pedro Alves
2012-02-15 22:24 ` Tom Tromey
2012-02-16 12:45 ` Pedro Alves [this message]
2012-02-16 14:42 ` Tom Tromey
2012-02-16 15:24 ` Tom Tromey
2012-02-20 2:41 ` [patch] testsuite: Fix inferior-died.exp racy FAILs [Re: RFC: fix crash when inferior exits during "continue"] Jan Kratochvil
2012-02-20 21:05 ` [commit] " Jan Kratochvil
2012-02-20 21:24 ` Tom Tromey
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=4F3CEC0E.4070603@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.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