From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11954 invoked by alias); 28 Jul 2015 17:35:41 -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 11945 invoked by uid 89); 28 Jul 2015 17:35:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f202.google.com Received: from mail-pd0-f202.google.com (HELO mail-pd0-f202.google.com) (209.85.192.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 28 Jul 2015 17:35:38 +0000 Received: by pdbfo6 with SMTP id fo6so9409206pdb.1 for ; Tue, 28 Jul 2015 10:35:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to:cc :content-type; bh=R5kk8AR4XWN1FBzvGNAjkk4zTrvv4a6Acx1jAxl7LfU=; b=OXYBYqCWMbBGoxd/hvaQ1R+MR5cNTxGfxh7ARK6DfkLAi3IX7vJJhmBmvx4wzJyqOY WKXiqjrXh+HDDBN3urOXwF5gx15V1KaI5afkkAiNSPDIvN8k06hHIkWALxx0d5d9ZCTt vH4tiD3I3wRTP030FF6wNLb4BoOlq3yOr/U9TROEcEjcAHCWlY2cBEUY4kvIPvlNdhVo Rn8rRCeaqw9jfs0tKHIlg8xv7J+Hw+JvIj6GQvVmbha7SmJ5movneuE0WdnajlVBOuDv DVlOgxKq9qrD/D2E2r0dHe8fkTXT1Grt8/8A1EWdwD+ToylqakkgH3DBqY47TNXZ9dGc eTcw== X-Gm-Message-State: ALoCoQl0+bbCQoGBy9JuIlR4AM4llcu0uCxuRa/eXPgnvESCLtpqMrX2FC13Ak8hIkc3ZzpWWKXy MIME-Version: 1.0 X-Received: by 10.66.237.2 with SMTP id uy2mr37535684pac.11.1438104936285; Tue, 28 Jul 2015 10:35:36 -0700 (PDT) Message-ID: <001a11381844e0dffe051bf2e570@google.com> Date: Tue, 28 Jul 2015 17:35:00 -0000 Subject: Re: [PATCH 4/5] Use TARGET_FILENAME_PREFIX as the system root in some cases From: Doug Evans To: Gary Benson Cc: gdb-patches@sourceware.org, Pedro Alves , Sandra Loosemore , Paul_Koning@Dell.com, Jan Kratochvil , Joel Brobecker Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00837.txt.bz2 Gary Benson writes: > This commit updates solib_find_1 to use TARGET_FILENAME_PREFIX as the > system root if auto-target-prefix is enabled and gdb_sysroot is empty > and the target filesystem is not the local filesystem. > > gdb/ChangeLog: > > * solib.c (auto_target_prefix): New static variable. > (solib_find_1): Use TARGET_FILENAME_PREFIX as sysroot > in some cases. > (show_auto_target_prefix): New function. > (_initialize_solib): New "set/show auto-target-prefix" > commands. > * NEWS: Mention that GDB will use "target:" as the system > root in some cases. Mention new "set/show auto-target-prefix" > commands. > > gdb/doc/ChangeLog: > > * gdb.texinfo (Commands to Specify Files): Document the > "set/show auto-target-prefix" commands. Hi. Still not sure whether the subtlety between these two will trip people up. $ gdb (gdb) file a.out (gdb) target remote :9999 # no "target:" prefix (=no files transferred) $ gdb (gdb) target remote :9999 # "target:" prefix, files transferred One thing that comes to mind is that there's no indication/warning here of the potential massive responsiveness hit people may take if they turn this feature on, plus an explanation of what's going on, or how they can do things differently to avoid it. If, after doing: (gdb) target remote :9999 the user was first prompted with something like: "Warning: I have no way to find files with debug info locally, and auto-target-prefix is set to "on", so I will try to fetch these files from the target. This may take time. If you want to avoid having me try to transfer files from the target, you can do the following: blah blah blah Are you sure you want to continue?" [suitably cleaned up, I didn't want to spend any time wordsmithing that] then that may be sufficient. What do others think? I agree that we should get this resolved for 7.10 though.