From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 8AB903858D38 for ; Mon, 11 Sep 2023 15:15:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8AB903858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 38BFFZkJ028335 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 11 Sep 2023 11:15:39 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 38BFFZkJ028335 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1694445339; bh=geziTzACMwDaPFKHstI6czmP9vG4+XvOWnojoP/MzmQ=; h=Date:Subject:To:References:From:In-Reply-To:From; b=A0eOOhee+qpSXrSP3FbZYZtrWvZJtFZLSuc4t1i/V3A6qjxuCSS+mOdzzi8L0njxz xLNwO8qsbw/KYJB833+FV/xp7MVotACqfd33YvvHVi2ep7wz/t/62WKiFJgBHK7aPb YFXn9OkLYUIjlcmtN1sZt00NZgVNhipefuY8ORjQ= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C32C81E092; Mon, 11 Sep 2023 11:15:34 -0400 (EDT) Message-ID: <0596bb71-6922-48d5-8dea-c05d16ccfdc1@polymtl.ca> Date: Mon, 11 Sep 2023 11:15:34 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 19/21] gdb: pass down current_ui to set_top_level_interpreter Content-Language: fr To: Simon Marchi , gdb-patches@sourceware.org References: <20230908190227.96319-1-simon.marchi@efficios.com> <20230908190227.96319-20-simon.marchi@efficios.com> From: Simon Marchi In-Reply-To: <20230908190227.96319-20-simon.marchi@efficios.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 11 Sep 2023 15:15:35 +0000 X-Spam-Status: No, score=-3037.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 9/8/23 14:23, Simon Marchi via Gdb-patches wrote: > In preparation for making set_top_level_interpreter a method of struct > ui. > > Change-Id: I9d1a67f01f49743ef72c002bd7876e6d2f97b77a > --- > gdb/interps.c | 6 +++--- > gdb/interps.h | 9 +++++---- > 2 files changed, 8 insertions(+), 7 deletions(-) > > diff --git a/gdb/interps.c b/gdb/interps.c > index 465c174ea794..f954d503538c 100644 > --- a/gdb/interps.c > +++ b/gdb/interps.c > @@ -83,15 +83,15 @@ find_interp_factory (const char *name) > /* See interps.h. */ > > void > -set_top_level_interpreter (const char *name) > +set_top_level_interpreter (ui *ui, const char *name) > { > /* Find it. */ > - struct interp *interp = current_ui->lookup_interp (name); > + struct interp *interp = ui->lookup_interp (name); > > if (interp == NULL) > error (_("Interpreter `%s' unrecognized"), name); > /* Install it. */ > - current_ui->set_current_interpreter (interp, true); > + ui->set_current_interpreter (interp, true); > } > > void > diff --git a/gdb/interps.h b/gdb/interps.h > index 278ee5aff9a5..4c094bf33e32 100644 > --- a/gdb/interps.h > +++ b/gdb/interps.h > @@ -215,10 +215,11 @@ class interp : public intrusive_list_node > bool inited = false; > }; > > -/* Set the current UI's top level interpreter to the interpreter named > - NAME. Throws an error if NAME is not a known interpreter or the > - interpreter fails to initialize. */ > -extern void set_top_level_interpreter (const char *name); > +/* Set UI's top level interpreter to the interpreter named NAME. > + > + Throws an error if NAME is not a known interpreter or the interpreter fails > + to initialize. */ > +extern void set_top_level_interpreter (ui *ui, const char *name); > > /* Temporarily set the current interpreter, and reset it on > destruction. */ > -- > 2.42.0 > The Linaro CI helpfully built this patch series and found that this patch misses updating the set_top_level_interpreter calls, so doesn't build (the next patch fixes things up). I have updated this patch locally to pass current_ui to the places that call set_top_level_interpreter. Simon