From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id B8CA73858D33 for ; Wed, 16 Aug 2023 16:40:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B8CA73858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWJZ8-0008NY-Ci; Wed, 16 Aug 2023 12:40:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Z/cYOVRmsl5LFHGdoHIlTx0kXwIVykgkvZuwh+JmC7M=; b=X+AsD/vQk5PE NwceJhXaoyj5HaqKJg6q8C1TLw0p9fDIalanddjLMAa5qvymUayscnaaW5Gz0gg2J9xdzAwaifsJD sxDBNSuKfNwsL0ZA+khFeh7Zrn8dGXhq7N6bxqTUPoRp2dOr0OvZtm4cNhpXVYVIpUfJRk+kWNjOw Lix9zkx3XV+LBBWcCT9dwixgtNUhyQku/6HZjnlwTaWlGDEegFF/L79MQpl1yX9ir0enIl/tvip7C eDlwhIuinAXppO6Niv/7k7tubGTDvd+sikKz8+MX3sfDug+F6hOrkw/a4diOsGG/EJewWL2/mOJzi CKzfhJKKvxSHl9ertIsP+A==; Date: Wed, 16 Aug 2023 19:40:17 +0300 Message-Id: <83ttsz6ivi.fsf@gnu.org> From: Eli Zaretskii To: Andrew Burgess Cc: gdb-patches@sourceware.org In-Reply-To: <1d040494926ba319681280137d05b903cb314572.1692200989.git.aburgess@redhat.com> (message from Andrew Burgess via Gdb-patches on Wed, 16 Aug 2023 16:55:04 +0100) Subject: Re: [PATCH 08/10] gdb: remote filesystem can be local to GDB in some cases References: <1d040494926ba319681280137d05b903cb314572.1692200989.git.aburgess@redhat.com> X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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: > Cc: Andrew Burgess > Date: Wed, 16 Aug 2023 16:55:04 +0100 > From: Andrew Burgess via Gdb-patches > > diff --git a/gdb/NEWS b/gdb/NEWS > index d83f097d937..99ed057c412 100644 > --- a/gdb/NEWS > +++ b/gdb/NEWS > @@ -106,6 +106,13 @@ > subsequent runs of the inferior will use the same arguments as the > first run. > > +* For remote targets that support the qMachineId packet, if GDB > + believes that the remote target is on the same host as GDB itself, > + and that GDB can access the same files as the remote target, then > + GDB will take advantage of this to access files directly, rather > + than copying them from the remote target. This behaviour can be > + disable using the new command 'set remote local-filesystem off'. > + > * New commands > > set debug breakpoint on|off > @@ -133,6 +140,24 @@ show always-read-ctf > info main > Get main symbol to identify entry point into program. > > +set remote local-filesystem on|off|auto > +show remote local-filesystem > + When 'on' GDB will assume that its local filesystem is the same > + filesystem as the remote target, this effectively means GDB will > + ignore any 'target:' prefix in the sysroot setting. When 'off' GDB > + will use the sysroot value to determine if a path is remote or not; > + a sysroot starting 'target:' indicates that paths should be treated > + as remote. > + > + The default value for this setting is 'auto', in this mode GDB will > + make use of the qMachineId packet to determine if the remote target > + is on the same host as GDB or not. For remote targets that don't > + support qMachineId, or in cases where the qMachineId indicates that > + the remote target is truly remote, GDB will behave as if this > + setting is 'off'. Only when qMachineId is supported, and qMachineId > + indicates the remote target is on the same host as GDB, will GDB > + treat this setting as 'on'. > + This part is OK. > +@anchor{set remote local-filesystem} > +@item set remote local-filesystem @r{[}auto@r{|}on@r{|}off@r{]} > +@itemx show remote local-filesystem > +@cindex filesystem, for remote target @cindex before @item again. > + add_setshow_auto_boolean_cmd ("local-filesystem", class_files, > + &remote_filesystem_is_local, _("\ > +Set whether the remote's filesystem is local to GDB."), _("\ > +Show whether the remote's filesystem is local to GDB."), _("\ > +When 'on' GDB assumes that the remote target's filesystem is the same\n\ ^ Comma missing there. > +When 'off' GDB will always fetch files using the remote protocol,\n\ ^ And there. Thanks. Reviewed-By: Eli Zaretskii