From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108165 invoked by alias); 28 Jul 2015 15:38:42 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 108153 invoked by uid 89); 28 Jul 2015 15:38:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham 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; Tue, 28 Jul 2015 15:38:41 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 09CB83640FF; Tue, 28 Jul 2015 15:38:40 +0000 (UTC) Received: from blade.nx (ovpn-116-19.ams2.redhat.com [10.36.116.19]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6SFcdfO000820; Tue, 28 Jul 2015 11:38:39 -0400 Received: by blade.nx (Postfix, from userid 1000) id D5A58264F04; Tue, 28 Jul 2015 16:38:38 +0100 (BST) Date: Tue, 28 Jul 2015 15:38:00 -0000 From: Gary Benson To: Pedro Alves Cc: Sandra Loosemore , Paul_Koning@Dell.com, gdb@sourceware.org Subject: Re: GDB now takes 4 minutes to start up with remote gdbserver target Message-ID: <20150728153838.GA31325@blade.nx> References: <55B1A4FC.9010403@codesourcery.com> <20150724085244.GB22673@blade.nx> <55B2444C.106@codesourcery.com> <2906903F-7478-4B9D-8A9A-A6256F8076EF@dell.com> <20150724151148.GA18553@blade.nx> <55B26267.4060905@redhat.com> <55B27348.1020104@codesourcery.com> <20150727121454.GA15226@blade.nx> <20150728092507.GA28545@blade.nx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150728092507.GA28545@blade.nx> X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00066.txt.bz2 Gary Benson wrote: > Ok, here goes... > > * From a user's perspective GDB is magically prefixing *some* > executable and shared library filenames with "target:". > > * From a developer's perspective this magic prefixing is implemented > by having the string "target:" as the default sysroot. > > My proposal is to make the default sysroot be "" again, and add the > prefix in solib_find_1 if certain conditions are met, specifically: > > * Executable filenames get prefixed with "target:" iff: > Automatic "target:" prefixing is enabled > AND gdb_sysroot is "" > AND the filesystem is nonlocal > > * Shared library filenames get prefixed with "target:" iff: > Automatic "target:" prefixing is enabled > AND gdb_sysroot is "" > AND the filesystem is nonlocal > AND exec_filename starts with "target:" > > There's a new boolean here, "set auto-target-prefix on|off", which > is enabled by default. > > So: > > gdb; target remote :9999 -> "target:" prefix applied > gdb FILE; target remote :9999 -> no "target:" prefix > > The latter is how Sandra is invoking GDB. Also: > > gdb -n PID, and > gdb; attach PID -> "target:" prefix applied iff FS is nonlocal > > Aside from the fact that this should fix Sandra's use case without > breaking any I care about, I like that users doing non-remote, non- > container debugging will not see "target:" prefixes onscreen unless > they're actually necessary. I've submitted a series of the work I've done on this: https://sourceware.org/ml/gdb-patches/2015-07/msg00828.html Please reply to that thread instead of this. Thanks, Gary -- http://gbenson.net/