[PATCHv2 2/3] gdb: process startup files and startup command line options
Eli Zaretskii
eliz@gnu.org
Tue Jan 26 15:22:44 GMT 2021
> From: Andrew Burgess <andrew.burgess@embecosm.com>
> Date: Tue, 26 Jan 2021 09:48:12 +0000
>
> Adds the ability to process commands at a new phase during GDB's
> startup. This phase is earlier than the current initialisation file
> processing, before GDB has produced any output.
Thanks.
> +* GDB will now load and process commands from ~/.config/gdb/gdbstartup
> + or ~/.gdbstartup if these files are present. These files are
> + processed earlier than any of the previous initialization files and
> + can affect parts of GDB's startup that previously had already been
> + completed before the initialization files were read, for example
> + styling of the initial GDB greeting.
> +
> +* GDB now has two new options "--startup-command" and
> + "--startup-eval-command" with corresponding short options "-sx" and
> + "-sex" that allow options (that would normally appear in a
> + gdbstartup file) to be passed on the command line.
This part is OK.
> +@item -startup-command @var{file}
> +@itemx -sx @var{file}
> +@cindex @code{--startup-command}
> +@cindex @code{-sx}
> +Execute commands from file @var{file} as early as possible during the
> +initialization process, before any output is produced.
> +@xref{Startup}.
> +
> +@item -startup-eval-command @var{command}
> +@itemx -sex @var{command}
> +@cindex @code{--startup-eval-command}
> +@cindex @code{-sex}
> +Execute a single @value{GDBN} command as early as possible during the
> +initialization process, before any output is produced.
"As early as possible" could be taken as meaning there's something
non-deterministic in choosing the stage where these commands are
executed. How about "very early in the initialization process"
instead?
> +The files processed are split into two categories @dfn{startup files}
> +and @dfn{initialization files}.
> +
> +The startup file is loaded as early as possible during
The first sentence above says "files", the second says "the file", as
if there's only one. Which one is it?
(And the same issue with "as early as possible" as before.)
> +@value{GDBN}'s startup, before the interpreter (@pxref{Interpreters})
> +has been initialised, and before the default target (@pxref{Targets}
> +is initialised. Only @code{set} or @code{source} commands should be
Our convention is to use the US English spellings, so please use
"initialized".
> +restrictions. Only commands that can appear in a startup file shold
^^^^^
A typo there.
> +While on Apple hosts the locations searched are:
Such a sentence shouldn't start with "while". I suggest "By
contrast," instead.
More information about the Gdb-patches
mailing list