From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id E510C3858C01 for ; Wed, 23 Aug 2023 13:42:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E510C3858C01 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id C7E3F302BBEC; Wed, 23 Aug 2023 15:42:42 +0200 (CEST) Received: by r6.localdomain (Postfix, from userid 1000) id 857803403E8; Wed, 23 Aug 2023 15:42:42 +0200 (CEST) Message-ID: <2776c0b933342ed8e34b6217d836cc1042ea7d4e.camel@klomp.org> Subject: Re: [PATCH 10/10] gdb: remote the get_remote_exec_file function From: Mark Wielaard To: Andrew Burgess , gdb-patches@sourceware.org Date: Wed, 23 Aug 2023 15:42:42 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-3034.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,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: Hi Andrew, On Wed, 2023-08-16 at 16:55 +0100, Andrew Burgess wrote: > After the previous commit, the get_remote_exec_file function is only > used in one place, so inline it and delete get_remote_exec_file. >=20 > There should be no user visible changes after this commit. This looks sane to me. Is the subject a clever joke or a typo? It made me smile, but also I had to read it three times before I understood what was really going on. Maybe s/remote the/remove the/ for clarity? Reviewed-by: Mark Wielaard > --- > gdb/remote.c | 14 +++----------- > 1 file changed, 3 insertions(+), 11 deletions(-) >=20 > diff --git a/gdb/remote.c b/gdb/remote.c > index e2d21c65b70..966bacd7fb5 100644 > --- a/gdb/remote.c > +++ b/gdb/remote.c > @@ -1864,16 +1864,6 @@ remote_target::get_remote_state () > return &m_remote_state; > } > =20 > -/* Fetch the remote exec-file from the current program space. */ > - > -static const std::string & > -get_remote_exec_file () > -{ > - const remote_exec_file_info &info > - =3D get_remote_exec_file_info (current_program_space); > - return info.first; > -} > - > /* Set the remote exec file for PSPACE. */ > =20 > static void > @@ -1900,7 +1890,9 @@ set_remote_exec_file_cb (const std::string &filenam= e) > static const std::string & > get_remote_exec_file_cb () > { > - return get_remote_exec_file (); > + const remote_exec_file_info &info > + =3D get_remote_exec_file_info (current_program_space); > + return info.first; > } > =20 > /* Implement the "show remote exec-file" command. */