From: Eli Zaretskii <eliz@gnu.org>
To: Christian Biesinger <cbiesinger@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 3/3 v2] Load system gdbinit files from a directory
Date: Mon, 26 Aug 2019 07:22:00 -0000 [thread overview]
Message-ID: <831rx8gzlc.fsf@gnu.org> (raw)
In-Reply-To: <20190826003310.86830-1-cbiesinger@google.com> (gdb-patches@sourceware.org)
> Date: Sun, 25 Aug 2019 19:33:10 -0500
> From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
> Cc: Christian Biesinger <cbiesinger@google.com>
>
> Adds a configure option --with-system-gdbinit-dir to specify a directory
> in which to look for gdbinit files. All files in this directory are
> loaded on startup (subject to -n/-nx as usual).
I think this option's value should be displayed by "show
configuration" and by "gdb --config".
> +* If configured with --with-system-gdbinit-dir, GDB will now also load
I think "also" here might be confusing, because it lacks context. I
think we should say explicitly "in addition to the system-wide gdbinit
file" instead.
> + all files in that directory as system gdbinit files, unless the -nx
> + or -n flag is provided. These files can be written in any supported
Two spaces between sentences (here and elsewhere throughout the
patch).
> +@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 immediately after system.gdbinit (if
> +enabled) when @value{GDBN} starts, before command line options have been
> +processed.
I'm not sure I understand: _all_ files in that directory will be
loaded, regardless of how they are named? If so, I think we should
say that explicitly. We should probably also say that the order the
files are loaded is arbitrary. Also, we should say something about
that directory including subdirectories, because I think the reader
might wonder about that.
> @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. If scripting languages are enabled, the files
> +can be written in any of the supported languages as long as the extension matches
> +the language.
Is the order of reading as described, i.e. the file first, then the
files in the directory?
Btw, how does this option interact with auto-load safe-path? Would
GDB refuse to load init files from this directory if it considers them
"unsafe"?
> +@item --with-system-gdbinit-dir=@var{directory}
> +Configure @value{GDBN} to automatically load init files from a
> +system-wide directory. @var{directory} should be an absolute path.
^^^^^^^^^^^^^
"absolute file name". The Gnu Coding Standards frown on using "path"
for anything that is not PATH-style lists of directories.
> +@ifset SYSTEM_GDBINIT
> +@value{SYSTEM_GDBINIT_DIR}/*
> +@end ifset
@ifset SYSTEM_GDBINIT or @ifset SYSTEM_GDBINIT_DIR?
Thanks.
next prev parent reply other threads:[~2019-08-26 7:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 22:17 [PATCH 0/3] [RFC] Load " Christian Biesinger via gdb-patches
2019-08-20 22:18 ` [PATCH 2/3] Factor out the code to do the datadir-relocation for gdbinit Christian Biesinger via gdb-patches
2019-08-21 17:19 ` Sergio Durigan Junior
2019-08-21 17:44 ` Christian Biesinger via gdb-patches
2019-08-21 17:44 ` [PATCH 2/3 v2] " Christian Biesinger via gdb-patches
2019-08-21 17:47 ` [PATCH 2/3] " Sergio Durigan Junior
2019-08-21 18:08 ` Christian Biesinger via gdb-patches
2019-08-21 18:10 ` Sergio Durigan Junior
2019-08-20 22:18 ` [PATCH 1/3] Refactor get_init_files to use std::string Christian Biesinger via gdb-patches
2019-08-21 17:13 ` Sergio Durigan Junior
2019-08-21 17:29 ` Christian Biesinger via gdb-patches
2019-08-21 17:31 ` [PATCH 1/3 v2] " Christian Biesinger via gdb-patches
2019-08-21 17:34 ` [PATCH 1/3] " Sergio Durigan Junior
2019-08-20 22:18 ` [PATCH 3/3] Load system gdbinit files from a directory Christian Biesinger via gdb-patches
2019-08-21 17:32 ` Sergio Durigan Junior
2019-08-26 0:25 ` Christian Biesinger via gdb-patches
2019-08-26 0:33 ` [PATCH 3/3 v2] " Christian Biesinger via gdb-patches
2019-08-26 7:22 ` Eli Zaretskii [this message]
2019-09-12 22:12 ` Christian Biesinger via gdb-patches
2019-09-24 16:30 ` [PATCH 3/3 v3] " Christian Biesinger via gdb-patches
2019-10-03 18:42 ` Christian Biesinger via gdb-patches
2019-10-13 1:19 ` Christian Biesinger via gdb-patches
2019-08-21 18:15 ` [PATCH 3/3] " Sergio Durigan Junior
2019-08-21 18:46 ` Christian Biesinger via gdb-patches
2019-08-21 18:13 ` [PATCH 0/3] [RFC] Load " Pedro Alves
2019-08-21 18:33 ` Christian Biesinger via gdb-patches
2019-08-21 18:54 ` Sergio Durigan Junior
2019-08-25 22:24 ` Christian Biesinger via gdb-patches
2019-08-26 13:31 ` Pedro Alves
2019-09-12 22:14 ` Christian Biesinger via gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=831rx8gzlc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=cbiesinger@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox