From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1601 invoked by alias); 17 Jan 2012 18:29:21 -0000 Received: (qmail 1582 invoked by uid 22791); 17 Jan 2012 18:29:19 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SARE_LWSHORTT,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Jan 2012 18:29:05 +0000 Received: by vcbfl11 with SMTP id fl11so526783vcb.0 for ; Tue, 17 Jan 2012 10:29:04 -0800 (PST) Received: by 10.221.13.135 with SMTP id pm7mr11149200vcb.51.1326824944855; Tue, 17 Jan 2012 10:29:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.221.13.135 with SMTP id pm7mr11149191vcb.51.1326824944751; Tue, 17 Jan 2012 10:29:04 -0800 (PST) Received: by 10.220.229.1 with HTTP; Tue, 17 Jan 2012 10:29:04 -0800 (PST) In-Reply-To: <20120117174839.GA8459@host2.jankratochvil.net> References: <20120117095552.GA6141@host2.jankratochvil.net> <20120117162621.GA3883@host2.jankratochvil.net> <20120117165640.GB5344@host2.jankratochvil.net> <20120117174839.GA8459@host2.jankratochvil.net> Date: Tue, 17 Jan 2012 18:31:00 -0000 Message-ID: Subject: Re: [patch] New set auto-load-local-gdbinit + disable it by default From: Doug Evans To: Jan Kratochvil Cc: gdb-patches@sourceware.org X-System-Of-Record: true Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/msg00613.txt.bz2 On Tue, Jan 17, 2012 at 9:48 AM, Jan Kratochvil wrote: > On Tue, 17 Jan 2012 18:26:49 +0100, Doug Evans wrote: >> I, OTOH, like the (top-gdb) prompt. > > I think you and me can very easily do whatever we like with GDB. =A0I car= e more > about both newbie users of GDB and also about newcomers to GDB developmen= t. As if to suggest I don't care ... Ummm ... eh? >> One could argue the converse too ... Having to manually request >> whatever goodies the developers find useful adds a needless burden. >> Why can't gdb just auto-adjust itself for debugging the program at >> hand? > > Because it is then different than normal GDB. > > It is difficult to argue myself but IMO in a survey between GDB newbies t= hey > find easier if GDB behaves always the same than if it behaves differently > according to which program you load into it. Which survey is that? Is it online? [And I'm curious once they understand what's going on, what do they prefer. Every new thing involves a bit of a learning curve ... I'd be curious to know what the long term cost/benefit is for these newbies in addition to just the short term ... Once they understand it, do they prefer it?] >> There is the path that gdb searches for libthread_db, maybe you meant >> to refer to that; > > Yes, I meant this part. > > >> one can change it before choosing the file to debug. =A0 You seem to >> suggest that -nx was "good enough" before. =A0If that was good enough >> before (and that's a big "if"), why is changing the search path first >> not also "good enough". > > Now instead of just -nx one has to use also "set auto-load-scripts off", > use -ex "file X" and -ex "core-file Y" instead of just X and Y to get that > "set auto-load-scripts off" executed first, > use beforehand -ex "set libthread-db-search-path /foo", OK, that may be e= nough > if I did not miss anything else. Script it. > I admit I did not know about "set auto-load-scripts off" myself until > recently. > > >> As for Python auto-loading, if -nx was good enough before (and if one >> *really* wanted to run gdb in a security hardened environment one >> would use a secured VM or some such anyway ...), then why isn't >> turning off auto-loading of Python scripts ahead of time also good >> enough? > > Yes, it is, it is just too complicated, Too complicated how? Write the script once and you're done. If we had a contrib-like directory we could even ship one with gdb. > similiar to the extra VM. =A0I plan to > just merge the paragraph above into some user-accessible command-line opt= ion > "-safe". =A0I am just not sure how to load pretty printers from system li= braries > which are safe but which do not get loaded after "set auto-load-scripts o= ff". Are we sure we want to claim to the user community -safe is, umm, safe? It seems like we're a fair ways from being ready to claim it, setting aside auto-loading.