On 1/27/23 22:11, Tom Tromey wrote:
> I found one spot that says "No symbol table loaded", while other spots
> say "No symbol table is loaded". In the interests of unformity, this
> patch fixes that one spot.
>
> Tested on x86-64 Fedora 36.
> ---
> gdb/infcmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/infcmd.c b/gdb/infcmd.c
> index fd88b8ca328..baa771828b1 100644
> --- a/gdb/infcmd.c
> +++ b/gdb/infcmd.c
> @@ -537,7 +537,7 @@ start_command (const char *args, int from_tty)
> minimal symbols for the location where to put the temporary
> breakpoint before starting. */
> if (!have_minimal_symbols ())
> - error (_("No symbol table loaded. Use the \"file\" command."));
> + error (_("No symbol table is loaded. Use the \"file\" command."));
>
> /* Run the program until reaching the main procedure... */
> run_command_1 (args, from_tty, RUN_STOP_AT_MAIN);
> --
> 2.39.1
>
You patch LGTM.
However, I think it would be worth factoring all of these in a single
function (e.g. error_no_symbol_table).
$ ag '"No symbol table is loaded' | grep -v testsuite
p-exp.y:732: error (_("No symbol table is loaded. "
parse.c:239: error (_("No symbol table is loaded. Use the \"file\" command."));
d-exp.y:474: error (_("No symbol table is loaded. Use the \"file\" command"));
symtab.c:4517: error (_("No symbol table is loaded. Use the \"file\" command."));
source.c:264: error (_("No symbol table is loaded. Use the \"file\" command."));
infcmd.c:540: error (_("No symbol table is loaded. Use the \"file\" command."));
go-exp.y:586: error (_("No symbol table is loaded. "
ada-exp.y:1731: error (_("No symbol table is loaded. Use the \"file\" command."));
cli/cli-cmds.c:1247: error (_("No symbol table is loaded. Use the \"file\" command."));
linespec.c:1570: _("No symbol table is loaded. Use the \"file\" command."));
linespec.c:3734: _("No symbol table is loaded. "
c-exp.y:1220: error (_("No symbol table is loaded. Use the \"file\" command."));
Simon