From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1618 invoked by alias); 30 Apr 2018 17:44:56 -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 130817 invoked by uid 89); 30 Apr 2018 17:44:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=knowing X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 17:44:52 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32264231695; Mon, 30 Apr 2018 17:44:51 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6AC6108482; Mon, 30 Apr 2018 17:44:50 +0000 (UTC) Subject: Re: [RFA] (Ada/ravenscar) error during "continue" after task/thread switch To: Joel Brobecker , gdb-patches@sourceware.org References: <1524520308-85149-1-git-send-email-brobecker@adacore.com> From: Pedro Alves Message-ID: <1271837a-5016-f454-8fa6-8312b4ed6184@redhat.com> Date: Mon, 30 Apr 2018 17:44:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1524520308-85149-1-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-04/txt/msg00659.txt.bz2 Hi Joel, 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. 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 > 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. */ ? > + if (has_stack_frames () && !is_running (inferior_ptid)) > + check_frame_language_change (); Please double-check indentation of the check_frame_language_change call line. Thanks, Pedro Alves