From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32026 invoked by alias); 9 May 2012 04:22:08 -0000 Received: (qmail 32013 invoked by uid 22791); 9 May 2012 04:22:04 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 May 2012 04:21:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6767C1C6AB9; Wed, 9 May 2012 00:21:50 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 65irkGqdrqpI; Wed, 9 May 2012 00:21:50 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 15BA01C6AA2; Wed, 9 May 2012 00:21:48 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id DCD78145616; Tue, 8 May 2012 21:21:29 -0700 (PDT) Date: Wed, 09 May 2012 04:22:00 -0000 From: Joel Brobecker To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: [patch#3 5/8] set auto-load safe-path Message-ID: <20120509042129.GA24867@adacore.com> References: <20120403185058.GE14189@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120403185058.GE14189@host2.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2012-05/txt/msg00248.txt.bz2 Sorry to be coming this late in the discussion, but I thought I'd make one comment about the documentation: > gdb/doc/ > 2012-03-29 Jan Kratochvil > > * gdb.texinfo (Auto-loading): Extend the "show auto-load" > and "info auto-load" examples for safe-path. Put there also references > for "set auto-load safe-path" and "show auto-load safe-path". > New menu item for Auto-loading safe path. > (Auto-loading safe path): New node. > (Python Auto-loading): Update the expected output from "Missing" > to "No". I was trying to familiarize myself how things work, now, in terms of auto-loading, so I started reading the documetnation and I really got tricked into thinking that I'd be fine, and that things hadn't changed. The problem is that setting such as "set auto-load local-gdbint on" is not sufficient to get local .gdbinit files to get loaded automatically. I was really surprised when I got a warning while trying to debug GDB. I accept the new behavior, and the security claim, no problem. I just think that we can improve on the documentation as follow: In my opinion, we should definitely mention the "auto-load safe-path" setting at the very beginning of the auto-load section, before we start talking about the various kinds of files that can be automatically loaded. And I also think that it would be beneficial to add a reference to the safe-path setting in all "set auto-load ..." commands, to make sure that people who quickly search the documentation do not miss the important fact that setting "auto-load local-gdbinit" to "on" might not be sufficient. And lastly, it would have been nice if, after reading the documentation, the user could have had a sense of what policy GDB implements by default. For instance, GDB's default policy is to enable auto-loading of all files, but only from trusted directories specified via the "auto-load safe-path" setting. -- Joel