From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 10F433858D1E for ; Mon, 30 Jan 2023 16:13:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10F433858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.192] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5F2B41E112; Mon, 30 Jan 2023 11:13:37 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1675095218; bh=PNdlBvj8JP1W1976QlwKy9HFd1goPNtcFD/o2mjrTv8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=qupKFDcwqmpvort/uu9AA95gzQMNaBpKkmheBamw44Nce4XkhkGHXedixEJ8AoCW8 hM6YfO6sNe9xVadHYDWMieotqnG5ckHvoBS2JZCw/CkQug7H3l/tDdXiq2SRdMEukB SWy1CFEO/cJu46hTDtHUs9kufh3dwt1CT0JJtCFM= Message-ID: Date: Mon, 30 Jan 2023 11:13:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] Error message uniformity Content-Language: fr To: Tom Tromey , gdb-patches@sourceware.org References: <20230128031117.464724-1-tom@tromey.com> From: Simon Marchi In-Reply-To: <20230128031117.464724-1-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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