From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 62625 invoked by alias); 12 Aug 2015 12:32:59 -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 62616 invoked by uid 89); 12 Aug 2015 12:32:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 12 Aug 2015 12:32:58 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id A9A7C461E1; Wed, 12 Aug 2015 12:32:56 +0000 (UTC) Received: from blade.nx (ovpn-116-40.ams2.redhat.com [10.36.116.40]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7CCWtMO032494; Wed, 12 Aug 2015 08:32:55 -0400 Received: by blade.nx (Postfix, from userid 1000) id 502412643BC; Wed, 12 Aug 2015 13:32:54 +0100 (BST) Date: Wed, 12 Aug 2015 12:32:00 -0000 From: Gary Benson To: Pedro Alves Cc: Joel Brobecker , Doug Evans , Jan Kratochvil , gdb-patches , Sandra Loosemore , =?iso-8859-1?Q?Andr=E9_P=F6nitz?= , Paul Koning Subject: Re: [PATCH 0/2] Better handling of slow remote transfers Message-ID: <20150812123254.GA14726@blade.nx> References: <001a11c301b0388ac5051d0c5ab8@google.com> <20150811185519.GA28644@host1.jankratochvil.net> <20150811195943.GC22245@adacore.com> <20150812094831.GD11096@blade.nx> <55CB1B8D.6010501@redhat.com> <20150812103831.GA12792@blade.nx> <55CB2DF8.2050506@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55CB2DF8.2050506@redhat.com> X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00274.txt.bz2 Pedro Alves wrote: > On 08/12/2015 11:38 AM, Gary Benson wrote: > > It seems like you're saying this series is a big change, but it's > > really not: the core of it is that little snippet of logic, which > > is easy enough to reason about: > > > > IF target filesystem is remote > > AND auto_target_prefix is enabled > > AND no sysroot is set > > AND (we're looking for an executable > > OR we're looking for a solib loaded by a target-prefixed executable): > > Prefix the filename with "target:" > > > > IIUC, it still auto fetches the executable and then the solibs from > the target by default (e.g., after "attach"), so still subject to > lack of interruptibility? Yes and no. It will fetch the executable from the remote iff one has not been otherwise specified (i.e. by "file", or on the command line). It will *only* fetch libraries from the remote if the parent executable has a target prefix. So: (gdb) file a.out (gdb) target remote :9999 - exec_filename is "a.out" - exec_filename has no "target:" prefix - "target:" prefix is NOT applied to shared libraries - solib paths end up as "/path/to/libsolib.so.1" - solibs are NOT fetched over RSP But: (gdb) target remote :9999 - exec_filename is set to, e.g., "target:/path/to/a.out" - exec_filename HAS a "target:" prefix - "target:" prefix IS applied to shared libraries - solib paths end up as "target:/path/to/libsolib.so.1" - solibs ARE fetched over RSP Basically it fetches the libraries over RSP if and only if the executable was fetched over RSP. So it works as Sandra expects when she uses GDB her way, but it still has the automatic executable filename discovery and automatic fetch-from-remote for users who just do "target remote ..." on it's own (which is something that doesn't make much sense in 7.9). > > It's certainly way less invasive a change than making transfers > > interruptible would be. > > I was only OK with trying to make transfers interruptible in the > branch assuming it was something non-invasive, like a missing QUIT > here and there. No, gdbserver sends the data in PBUFSIZ chunks, but GDB reads the data a character at a time. Cheers, Gary -- http://gbenson.net/