From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/3 v2] Load system gdbinit files from a directory
Date: Thu, 12 Sep 2019 22:12:00 -0000 [thread overview]
Message-ID: <CAPTJ0XH02dr9=-w6nP2maOW58SRMG1R-z=JbPxqAESOi131rrA@mail.gmail.com> (raw)
In-Reply-To: <831rx8gzlc.fsf@gnu.org>
Thanks for the review!
On Mon, Aug 26, 2019 at 2:22 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > 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".
Done.
> > +* 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.
Done.
> > + 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).
I think I fixed all occurrences. (searching gdb.texinfo for "\. [^ ]"
found a lot of existing places that do it wrong :( )
> > +@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.
I changed it now so that only .gdb/.py/.scm is loaded, and documented that.
> We should probably also say that the order the
> files are loaded is arbitrary.
They're actually alphabetically sorted; added a note in the
documentation about that.
> Also, we should say something about
> that directory including subdirectories, because I think the reader
> might wonder about that.
Done.
> > @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?
Yes.
> 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"?
No, that is not consulted for these files (if it were, the system
gdbinit file or ~/.gdbinit would not work in the common case, because
the auto-load path is $debugdir:$datadir/auto-load)
> > +@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.
Changed to "absolute directory name"; I didn't want to use "file name"
for a directory.
(looks like a number of other occurrences in gdb.texinfo should be
changed too...)
> > +@ifset SYSTEM_GDBINIT
> > +@value{SYSTEM_GDBINIT_DIR}/*
> > +@end ifset
>
> @ifset SYSTEM_GDBINIT or @ifset SYSTEM_GDBINIT_DIR?
Thanks, fixed.
Will send a new patch in a second.
Christian
next prev parent reply other threads:[~2019-09-12 22:12 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 3/3] Load system " 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
2019-09-12 22:12 ` Christian Biesinger via gdb-patches [this message]
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-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 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-21 18:13 ` [PATCH 0/3] [RFC] Load gdbinit files from a directory 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='CAPTJ0XH02dr9=-w6nP2maOW58SRMG1R-z=JbPxqAESOi131rrA@mail.gmail.com' \
--to=gdb-patches@sourceware.org \
--cc=cbiesinger@google.com \
--cc=eliz@gnu.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