From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24554 invoked by alias); 18 Jan 2012 19:19:28 -0000 Received: (qmail 24537 invoked by uid 22791); 18 Jan 2012 19:19:26 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Jan 2012 19:19:07 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0IJIpWS008994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Jan 2012 14:18:51 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q0IJIkJI021098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 18 Jan 2012 14:18:49 -0500 Date: Wed, 18 Jan 2012 19:38:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Tom Tromey , Eli Zaretskii , dje@google.com, gdb-patches@sourceware.org Subject: Re: [patch] New set auto-load-local-gdbinit + disable it by default Message-ID: <20120118191846.GA21957@host2.jankratochvil.net> References: <20120117095552.GA6141@host2.jankratochvil.net> <20120117162621.GA3883@host2.jankratochvil.net> <837h0q5i4u.fsf@gnu.org> <20120117175957.GA9415@host2.jankratochvil.net> <83ty3u3uj1.fsf@gnu.org> <20120118035927.GY31383@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120118035927.GY31383@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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-01/txt/msg00680.txt.bz2 On Wed, 18 Jan 2012 04:59:27 +0100, Joel Brobecker wrote: > I would like to propose the following, however, to help the users > who want to continue relying on it. I am happy to implement it > if necessary: > > Provide a new command that would read the .gdbinit file in > the current working directory if present, and do nothing > otherwise. I would like to provide options that select > between loading silently, and loading with a warning first, > and why not, asking before loading. > > The idea is that the user who would like to preserve > the old behavior can put that command in his $HOME/.gdbinit > file. The goal was you can do either echo 'set auto-load-local-gdbinit on' >>~/.gdbinit or echo 'set auto-load-local-gdbinit on' >>/etc/gdbinit and you get the former behavior. Did you still prefer the command you propose? > . To me, it is extremely important that system-gdbinit is still > automatically loaded. This patch/discussion affect neither /etc/gdbinit nor ~/.gdbinit in any way. > It should be considered as trusted, Yes, they are. > . About the auto-loading of Python code: I think that the cost > of removing the auto-loading, even if it is only for non-trusted > directories, would be too high. I would prefer if it discussed > this separately after the .gdbinit issue has been resolved. After the discussion my current plan is: * change .gdbinit to PROGRAM-gdb.rc (like -gdb.py), rename FSF GDB src/gdb/.gdbinit to src/gdb/gdb-gdb.rc, delete FSF GDB src/testsuite/.gdbinit ("set height 400" only, why?) This will fix the annoying problems of running gdb for other programs in the src/gdb/ directory. * deprecate .gdbinit * propose less intrusive gdb-gdb.rc, this sure affects only GDB developers, like do not change the outer prompt to "(top-gdb)"; I do not mind much. * in a second patch series deal with security, propose some "-safe" option, PROGRAM-gdb.rc is more visible than .gdbinit, it has the same security issue like PROGRAM-gdb.py and we have to deal with -gdb.py already anyway. Thanks, Jan