From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24081 invoked by alias); 2 Oct 2012 17:46:26 -0000 Received: (qmail 24066 invoked by uid 22791); 2 Oct 2012 17:46:22 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qc0-f201.google.com (HELO mail-qc0-f201.google.com) (209.85.216.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Oct 2012 17:46:17 +0000 Received: by qcha6 with SMTP id a6so756940qch.0 for ; Tue, 02 Oct 2012 10:46:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:message-id:to:subject:from:x-gm-message-state; bh=tpMBWxA4pUyI8bjPoiFNa7YYCNIf0uGs5reM3mygmw4=; b=EgjpKVw0H8wX0dRB+NV6F7KGH2X61RQG5KRDv3Gf0rlGawYLbJMbzA8MWq9nnsWQWK 484u/KqwHl6VStkqauz6IOZ2AnHYlxtIuNP9AXUGTsiPNhfC8kLDzn81SzOVhC+WZpD2 FuvFL0dQk6oVUgWZJSsC5huPdWP80q28sjTwCZ/D4H03kavc8faYgUuNIDhpNVbWEEqS ef6fR9zRbNIPh1Esq5Df5E7KHpn7t2Wp5F4bIAKO7Im/2x/NLl4QaPQYVQcx8XW5YiGR dEcAxFmzkbm6tLfQH7I9nJ+UJ/p7RiqAEVJMz3eBFOk5GsY5zw5c0s0TtjI1BJRtkxkl lhxg== Received: by 10.236.35.66 with SMTP id t42mr4184675yha.10.1349199976562; Tue, 02 Oct 2012 10:46:16 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id r20si193781ano.1.2012.10.02.10.46.16 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 02 Oct 2012 10:46:16 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.18.110.129]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 07B76100048; Tue, 2 Oct 2012 10:46:15 -0700 (PDT) Date: Tue, 02 Oct 2012 17:46:00 -0000 Message-Id: To: gdb-patches@sourceware.org, eliz@gnu.org Subject: [doc RFA] New option -nh From: dje@google.com X-Gm-Message-State: ALoCoQkf2VqCuFEh39iL/iTTdYUopzWvg7tQNVnhe4DunfgVOHP4XeU6DSCuj/xZYwYgQX9oZFhEUuXBTu2F4QZUrCWxRBi0gQAWpnVaY+zcdnTJbYXNtFbjmkZ7gPNqU1X8qNGdBQu3g6U5FoLWYDBjSXamQDwmiriItG5pSzU6BnlRsdiVFyefrFskhPVgdOQipCzVy0a5tKjLY1QcJ6E74tlPZPNmNg== 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-10/txt/msg00023.txt.bz2 Hi. This needs a doc RFA. Previous discussion is here: http://sourceware.org/ml/gdb-patches/2012-09/msg00415.html 2012-10-02 Doug Evans New option -nh: inhibit loading of ~/.gdbinit. * NEWS: Mention -nh. * main.c (captured_main): Recognize and process -nh. (print_gdb_help): Mention -nh. doc/ * gdb.texinfo (Mode Options): Document -nh. Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.546 diff -u -p -r1.546 NEWS --- NEWS 21 Sep 2012 01:46:42 -0000 1.546 +++ NEWS 2 Oct 2012 17:39:53 -0000 @@ -3,6 +3,10 @@ *** Changes since GDB 7.5 +* New command line options: + +-nh Like -nx, but only disable auto-loading of ~/.gdbinit. + * Python scripting ** Vectors can be created with gdb.Type.vector. Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.113 diff -u -p -r1.113 main.c --- main.c 29 Aug 2012 19:17:16 -0000 1.113 +++ main.c 2 Oct 2012 17:39:53 -0000 @@ -273,6 +273,7 @@ captured_main (void *data) char **argv = context->argv; static int quiet = 0; static int set_args = 0; + static int inhibit_home_gdbinit = 0; /* Pointers to various arguments from command line. */ char *symarg = NULL; @@ -415,6 +416,7 @@ captured_main (void *data) {"quiet", no_argument, &quiet, 1}, {"q", no_argument, &quiet, 1}, {"silent", no_argument, &quiet, 1}, + {"nh", no_argument, &inhibit_home_gdbinit, 1}, {"nx", no_argument, &inhibit_gdbinit, 1}, {"n", no_argument, &inhibit_gdbinit, 1}, {"batch-silent", no_argument, 0, 'B'}, @@ -845,7 +847,7 @@ captured_main (void *data) global parameters, which are independent of what file you are debugging or what directory you are in. */ - if (home_gdbinit && !inhibit_gdbinit) + if (home_gdbinit && !inhibit_gdbinit && !inhibit_home_gdbinit) catch_command_errors (source_script, home_gdbinit, 0, RETURN_MASK_ALL); /* Process '-ix' and '-iex' options early. */ @@ -1066,9 +1068,12 @@ Options:\n\n\ fputs_unfiltered (_("\ -l TIMEOUT Set timeout in seconds for remote debugging.\n\ --nw Do not use a window interface.\n\ - --nx Do not read "), stream); + --nx Do not read any "), stream); fputs_unfiltered (gdbinit, stream); - fputs_unfiltered (_(" file.\n\ + fputs_unfiltered (_(" files.\n\ + --nh Do not read "), stream); + fputs_unfiltered (gdbinit, stream); + fputs_unfiltered (_(" file from home directory.\n\ --quiet Do not print version number on startup.\n\ --readnow Fully read symbol files on first access.\n\ "), stream); Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.1012 diff -u -p -r1.1012 gdb.texinfo --- doc/gdb.texinfo 21 Sep 2012 01:46:42 -0000 1.1012 +++ doc/gdb.texinfo 2 Oct 2012 17:39:53 -0000 @@ -1048,6 +1048,13 @@ Do not execute commands found in any ini options and arguments have been processed. @xref{Command Files,,Command Files}. +@anchor{-nh} +@item -nh +@cindex @code{--nh} +Do not execute commands found in @file{~/.gdbinit}, the init file +in your home directory. +@xref{Startup}. + @item -quiet @itemx -silent @itemx -q