From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Error message uniformity
Date: Mon, 30 Jan 2023 11:13:37 -0500 [thread overview]
Message-ID: <c7771b80-427a-5df6-c829-151f066b0df5@simark.ca> (raw)
In-Reply-To: <20230128031117.464724-1-tom@tromey.com>
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
next prev parent reply other threads:[~2023-01-30 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 3:11 Tom Tromey
2023-01-30 16:13 ` Simon Marchi [this message]
2023-01-30 23:36 ` Tom Tromey
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=c7771b80-427a-5df6-c829-151f066b0df5@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).