From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1152 invoked by alias); 21 Sep 2012 16:23:18 -0000 Received: (qmail 1139 invoked by uid 22791); 21 Sep 2012 16:23:15 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vc0-f169.google.com (HELO mail-vc0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Sep 2012 16:23:02 +0000 Received: by vcbfl17 with SMTP id fl17so4602173vcb.0 for ; Fri, 21 Sep 2012 09:23:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-system-of-record:x-gm-message-state; bh=9EXOt4u1G2H0jcJEqLaDBUP7AqqPVnFobJBC9Dl4B+I=; b=CN8uqmKdtqCTECj3n7tqTXSeQvM4jh1N+Q2zJHxqaxnuLbXZcTQ49cgGvm59NqfIgU ytoXvJUEAxO9S7uYzK8wwoFJVcaV3MeaKZq79gX8wcSC2ijQFmNX5BC3+rEhLlUaYEP6 FRXDGV2wFEejC02yLL3e09PNxMHWjuAI6B/tKoZz2osWXAChj9knaCtkpqQ65altCwEm lGZ6mTrxNFfHw9kXRtPwJJeyfXUgtuTUvKW1REPhUUBortWTp8LxsWysHUE8SsWd/34S a12hDbsdHCxfHBzTEuTEFmDkWuNKWMbLv3yBi+io15cMtExnkF7YsZf+2Q/n7qy1bCJw F18w== Received: by 10.58.89.168 with SMTP id bp8mr3442417veb.20.1348244582087; Fri, 21 Sep 2012 09:23:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.89.168 with SMTP id bp8mr3442410veb.20.1348244581953; Fri, 21 Sep 2012 09:23:01 -0700 (PDT) Received: by 10.52.24.239 with HTTP; Fri, 21 Sep 2012 09:23:01 -0700 (PDT) In-Reply-To: <20120921153508.GA29943@host2.jankratochvil.net> References: <20120921153508.GA29943@host2.jankratochvil.net> Date: Fri, 21 Sep 2012 16:23:00 -0000 Message-ID: Subject: Re: [RFC] New option -nh: disable loading ~/.gdbinit From: Doug Evans To: Jan Kratochvil Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-Gm-Message-State: ALoCoQmCqkpORlvGo1lG59Ew6DLkvgeSvDGgjTdy8E8kl178zFJfv1Z1pAPxbO1lo2ALNHPbO6EFRZoc/RRfNF/mpxSV0vk9q9O8G3eT8iSHCg+/XdynMKwYi5yUqV2qcIdjL++dQ+poJA/tCIqnbNpP3KGjUyw/IoEi6vsIXTOA/it53gXtjvjhwZECSkKYDruXo/oNNBhcG98ZQ536SZs/CJRfNoEKjw== 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-09/txt/msg00439.txt.bz2 On Fri, Sep 21, 2012 at 8:35 AM, Jan Kratochvil wrote: > On Fri, 21 Sep 2012 00:01:54 +0200, dje@google.com wrote: >> When running tests (not necessarily tests in gdb/testsuite!) with a >> gdb with a non-trivial system.gdbinit, >> it is useful to be able disable loading ~/.gdbinit. >> system.gdbinit is still necessary, it provides necessary functionality. >> >> One *could* run the tests with -nx -x /path/to/system.gdbinit, >> but the path to system.gdbinit is not necessarily easy to obtain. >> >> Instead, I'd like to add this option: -nh. > > The current auto-load functionality: > (gdb) set auto-load > gdb-scripts local-gdbinit safe-path > libthread-db python-scripts scripts-directory > > besides local-gdbinit would logically have also system-gdbinit and > home-gdbinit. > > -nx would be then equivalent to all of: > -iex 'set auto-load system-gdbinit off' > -iex 'set auto-load home-gdbinit off' > -iex 'set auto-load local-gdbinit off' > > -nh would be then equivalent to: > -iex 'set auto-load home-gdbinit off' > > Wouldn't be the last option more clear than another magic option '-nh'? magic? Say what? > The patch would be short, I could even post it but so far it was more just > some sort of a clean-up but if you even have a use for it. In this case I like the short -nh.