[PATCH 2/7] gdb: use get_standard_config_dir when looking for .gdbinit
Eli Zaretskii
eliz@gnu.org
Thu Oct 8 06:52:14 GMT 2020
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Wed, 7 Oct 2020 21:05:06 +0100
> Cc: Tom Tromey <tom@tromey.com>
>
> This commit effectively changes the default location of the .gdbinit
> file, while maintaining backward compatibility.
>
> For non Apple hosts the .gdbinit file will now be looked for in the
> following locations:
>
> $XDG_CONFIG_HOME/gdb/gdbinit
> $HOME/.config/gdb/gdbinit
> $HOME/.gdbinit
>
> On Apple hosts the search order is instead:
>
> $HOME/Library/Preferences/gdb/gdbinit
> $HOME/.gdbinit
Thanks.
I still wonder why we treat Apple specially here.
> +Do not execute commands found in any initialization file
"files"
Also, I think this should say "in any startup or initialization
files", as startup file loading is also prevented, right?
> +(@pxref{Initialization Files}).
There should be a cross-reference to where startup files are described
as well.
> +As the system wide and home directory initialization files are
> +@value{GDBN} will check the current directory for a file called
> +@file{./.gdbinit}. It is loaded last, after command line options
^^^^^^^^^^
The "./" part is redundant here.
More information about the Gdb-patches
mailing list