From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20154 invoked by alias); 1 Jun 2018 12:42:24 -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 20137 invoked by uid 89); 1 Jun 2018 12:42:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=inadvertent 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; Fri, 01 Jun 2018 12:42:22 +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 D136A857A8; Fri, 1 Jun 2018 12:42:20 +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 3A43864687; Fri, 1 Jun 2018 12:42:20 +0000 (UTC) Subject: Re: [RFA] inadvertent language switch during breakpoint_re_set_one To: Joel Brobecker , Tom Tromey References: <1525976353-67414-1-git-send-email-brobecker@adacore.com> <87fu2z1fmf.fsf@tromey.com> <20180510204034.uxpqi3uuvvmk7koc@adacore.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <5d0da8ec-624d-24ee-85d4-8b2dc6f6349f@redhat.com> Date: Fri, 01 Jun 2018 12:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180510204034.uxpqi3uuvvmk7koc@adacore.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-06/txt/msg00011.txt.bz2 LGTM. Could nits below. On 05/10/2018 09:40 PM, Joel Brobecker wrote: > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -13881,6 +13881,19 @@ breakpoint_re_set (void) > scoped_restore save_input_radix = make_scoped_restore (&input_radix); > scoped_restore_current_pspace_and_thread restore_pspace_thread; > > + /* breakpoint_re_set_one sets the current_language to the language > + of the breakpoint it is resetting (see prepare_re_set_context) > + before re-evaluating the breakpoint's location. This change can > + unfortunately get undone by accident if the language_mode is set > + to auto, and we either switch frames, or more likely in this context, > + we select the current frame. > + > + We prevent this by temporarily turning the language_mode to > + language_mode_manual. We we restore it once all breakpoints Double "We we". > +gdb_run_cmd > +gdb_test "" \ > + "Breakpoint $decimal, a \\(\\).*" \ > + "Run until breakpoint at a'address" Lowercase "run". Thanks, Pedro Alves