From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20538 invoked by alias); 18 Oct 2019 11:57:48 -0000 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 Received: (qmail 20239 invoked by uid 89); 18 Oct 2019 11:57:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-30.2 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=ham version=3.3.1 spammy=approval, gerrit@gnutoolchain-gerrit.osci.io, U*gerrit, H*MI:sk:CAPTJ0X X-HELO: mail-oi1-f180.google.com Received: from mail-oi1-f180.google.com (HELO mail-oi1-f180.google.com) (209.85.167.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2019 11:57:46 +0000 Received: by mail-oi1-f180.google.com with SMTP id o205so4942321oib.12 for ; Fri, 18 Oct 2019 04:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SXoFpKizZflv1K2wCLmK1IfrovJ5FdpdDJmFpwGBuN4=; b=mhg3j9sckn/0S6faCBSxDxr0eMkI4/JUzi47bHRnDXaUWX/3lqQRGwTTmmuLaQopIF pqfmfShAIIH4ClBmgCCySld8CLzuHh2Kgo4XzLDCYBhaynyf2FpbR6vHG9NgYBhDZMpv kcju12mQYYyAiWXq7bMEjgFdbhEz25Bzj3963i1kkxwseP/dF3bZZDtnbNF4MBTrolZm FSz0WvzC5WGj87M8Klqx28ytJEhzDT9QIxaiOgAktsQgpDIH2AG4lbeHFZkt2uIW58Y1 utIRZE92AoGicNnUVjN5sqnNZWxhP8L/L+JsZMRcH3Ek/Wh5Qg8xdJNCVshmu01JPLtA tSnQ== MIME-Version: 1.0 References: <20191016221835.354DA20AF6@gnutoolchain-gerrit.osci.io> <83ftjrdfge.fsf@gnu.org> In-Reply-To: <83ftjrdfge.fsf@gnu.org> From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Fri, 18 Oct 2019 11:57:00 -0000 Message-ID: Subject: Re: [review] Load system gdbinit files from a directory To: Eli Zaretskii Cc: gdb-patches , Tom de Vries , Simon Marchi Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00619.txt.bz2 On Thu, Oct 17, 2019 at 8:00 AM Eli Zaretskii wrote: > > > Date: Wed, 16 Oct 2019 18:18:34 -0400 > > From: "Christian Biesinger (Code Review)" > > Cc: Tom de Vries , Simon Marchi > > > > gdb/ChangeLog: > > > > 2019-08-20 Christian Biesinger > > > > * NEWS: Mention new --with-system-gdbinit-dir option. > > * config.in: Regenerate. > > * configure: Regenerate. > > * configure.ac: Add new option --with-system-gdbinit-dir. > > * extension.c (get_ext_lang_of_file): Return extension_language_gdb > > for a ".gdb" suffix. > > * main.c (get_init_files): Change system_gdbinit argument to > > a vector and return the files in SYSTEM_GDBINIT_DIR in > > addition to SYSTEM_GDBINIT. > > (captured_main_1): Update. > > (print_gdb_help): Update. > > * top.c (print_gdb_configuration): Also print the value of > > SYSTEM_GDBINIT_DIR. > > > > gdb/doc/ChangeLog: > > > > 2019-08-25 Christian Biesinger > > > > * Makefile.in: Also set SYSTEM_GDBINIT_DIR for the info manual > > generation. > > * gdb.texinfo (many sections): Document new --with-system-gdbinit-dir > > option. > > I think I already approved the changes to the documentation, didn't I? You did review them before (https://sourceware.org/ml/gdb-patches/2019-08/msg00585.html) but I'm not sure that it counted as an approval. In any case, thanks for taking a look at the updated patch. > > diff --git a/gdb/NEWS b/gdb/NEWS > > index 25e67e4..7613598 100644 > > --- a/gdb/NEWS > > +++ b/gdb/NEWS > > @@ -46,6 +46,12 @@ > > The 'outer_function::' prefix is only needed if 'inner_function' is > > not visible in the current scope. > > > > +* In addition to the system-wide gdbinit file, if configured with > > + --with-system-gdbinit-dir, GDB will now also load files in that directory > > + as system gdbinit files, unless the -nx or -n flag is provided. Files > > + with extensions .gdb, .py and .scm are supported as long as GDB was > > + compiled with support for that language. > > OK for this part. > > > +@item @file{system.gdbinit.d} > > +This is the system-wide init directory. > > +Its location is specified with the @code{--with-system-gdbinit-dir} > > +configure option (@pxref{System-wide configuration}). > > +Files in this directory are loaded in alphabetical order immediately after > > +system.gdbinit (if enabled) when @value{GDBN} starts, before command line > > +options have been processed. Files need to have a recognized scripting > > +language extension (@code{.py}/@code{.scm}) or be named with a @code{.gdb} > > File-name extensions should have the @file markup. > > > @@ -1315,8 +1325,11 @@ > > @cindex init file > > Reads the system-wide @dfn{init file} (if @option{--with-system-gdbinit} was > > used when building @value{GDBN}; @pxref{System-wide configuration, > > - ,System-wide configuration and settings}) and executes all the commands in > > -that file. > > + ,System-wide configuration and settings}) and the files in the system-wide > > +gdbinit directory (if @option{--with-system-gdbinit-dir} was used) and executes > > +all the commands in those files. The files need to be named with a @code{.gdb} > > +extension to be interpreted as @value{GDBN} commands, or they can be written > > +in a supported scripting language with an appropriate file extension. > > Likewise here, and elsewhere in the patch. Thank you, updated all of those to @file. Will upload a new version to gerrit momentarily. Christian