From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129788 invoked by alias); 30 Apr 2018 22:15:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 129777 invoked by uid 89); 30 Apr 2018 22:15:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1999, choosing X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 22:15:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id CFF66117422; Mon, 30 Apr 2018 18:15:45 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Iv5TvuJhWLK5; Mon, 30 Apr 2018 18:15:45 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 9FA9F1173AE; Mon, 30 Apr 2018 18:15:45 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id E36AC83055; Mon, 30 Apr 2018 15:15:43 -0700 (PDT) Date: Mon, 30 Apr 2018 22:15:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFA] (Ada/ravenscar) error during "continue" after task/thread switch Message-ID: <20180430221543.jj4nd3w26sica6wo@adacore.com> References: <1524520308-85149-1-git-send-email-brobecker@adacore.com> <1271837a-5016-f454-8fa6-8312b4ed6184@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1271837a-5016-f454-8fa6-8312b4ed6184@redhat.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-04/txt/msg00669.txt.bz2 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