From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] (Ada/ravenscar) error during "continue" after task/thread switch
Date: Mon, 30 Apr 2018 22:15:00 -0000 [thread overview]
Message-ID: <20180430221543.jj4nd3w26sica6wo@adacore.com> (raw)
In-Reply-To: <1271837a-5016-f454-8fa6-8312b4ed6184@redhat.com>
Hi Pedro,
> The change to top.c looks right regardless of having been noticed
> on ravenscar only so far. I can imagine other scenarios where this
> would be necessary even on GNU/Linux.
My thinking also.
> So LGTM, with minor nits below fixed.
>
> On 04/23/2018 10:51 PM, Joel Brobecker wrote:
> > + swtich inferior_ptid to the ptid of the actually active thread;
>
> > checks to see if the language may no longer be maching the current
>
> > in cases the inferior isn't running. Otherwise, it skips it, knowning
> My Thunderbird noticed these typos above:
>
> swtich -> switch
> maching -> matching
> knowning -> knowing
Thanks! Fixed.
> > diff --git a/gdb/top.c b/gdb/top.c
> > index 8903a92..0480726 100644
> > --- a/gdb/top.c
> > +++ b/gdb/top.c
> > @@ -642,7 +642,12 @@ execute_command (const char *p, int from_tty)
> > }
> > }
> >
> > - check_frame_language_change ();
> > + /* Only perform the frame-language-change check unless the command
> > + we just finished executing did not resume the inferior's execution.
> > + If it did resume the inferior, we will do that check after
> > + the inferior stopped. */
>
> "only ... unless ... did not" sounds odd. Did you mean:
>
> - /* Only perform the frame-language-change check unless the command
> + /* Only perform the frame-language-change check if the command
> we just finished executing did not resume the inferior's execution.
> If it did resume the inferior, we will do that check after
> the inferior stopped. */
Indeed. I hesitated between two forms a little too much and ended up
choosing both at the same time... I took your suggestion.
> > + if (has_stack_frames () && !is_running (inferior_ptid))
> > + check_frame_language_change ();
[...]
> Please double-check indentation of the
> check_frame_language_change call line.
Hmmm, sorry, good catch. Fixed also.
I retested the patch on x86_64-linux and pushed it to master.
Thanks again,
--
Joel
prev parent reply other threads:[~2018-04-30 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 21:51 Joel Brobecker
2018-04-30 17:44 ` Pedro Alves
2018-04-30 22:15 ` Joel Brobecker [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=20180430221543.jj4nd3w26sica6wo@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@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