| Message ID | 20260405-more-error-style-v1-0-6c04da718875@tromey.com |
|---|---|
| Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 902544BA2E25 for <patchwork@sourceware.org>; Sun, 5 Apr 2026 11:29:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 902544BA2E25 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=xAWJbA1U X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 072554BA2E23 for <gdb-patches@sourceware.org>; Sun, 5 Apr 2026 11:28:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 072554BA2E23 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 072554BA2E23 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775388520; cv=none; b=WMLiKXPKVmV7rpPWXdxlDC+q2hMLtabGiaDMEjR5Kd0v+SyKthAP6LbIqZYn4H/tGbBYjNvVpyDFKegxxlXUQqB9Z/s9Kfo0IOXCnSYMXY2DuZUhcpzxaeGb3sULrBnib9mHCMMV5FUD/+e4ExSu6MdQyiA7QVivIZTv5cekeFw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775388520; c=relaxed/simple; bh=sLU9cIo59a1pXxsDz/EZrKBZgEAOMu2n7h5KXJxLV1c=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=XpHoPZoKbJWxyX4Zy0xi4hVlIvyJRwQkUG4HuxtJaiAr1JbUz6l1tcoV6RzqvXL84Luikpr0K+FKEcyFCuCOoLaD3WgPaWpsrUIrCEe3CkhcfeJ43M/NkUCb8ZfS/MR4p2EopNwmcXBMv/ILS1bK0OQGXeNAN7nH1F9qwfUV4pk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 072554BA2E23 Received: from eig-obgw-6002b.ext.cloudfilter.net ([10.0.30.203]) by cmsmtp with ESMTPS id 9BEnwIo6Cnwj29Legw42np; Sun, 05 Apr 2026 11:28:38 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 9LefweK0NwWe69LefwybOH; Sun, 05 Apr 2026 11:28:38 +0000 X-Authority-Analysis: v=2.4 cv=RfSQC0tv c=1 sm=1 tr=0 ts=69d24766 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=gQBQU8UON4bBfBz1kC8A:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XXdI4L7d7vbDP0d7WF8Sv7+9X5IWoworX5kEkfS+vw0=; b=xAWJbA1UuFxpI/OEskhF/4jCuw +Ab4B3rv85rmcNHeOvfw6WFTDjdUQMVbPoN+GxiuupgSmKukvkOP64cLI5p6Q+fWGvXWCxxTEi7UU w23qmVIQ6ASHvnUSDb8Ts8HIZ; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:42722 helo=[192.168.122.1]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from <tom@tromey.com>) id 1w9Lef-00000001QMu-1mVQ; Sun, 05 Apr 2026 05:28:37 -0600 From: Tom Tromey <tom@tromey.com> Subject: [PATCH 0/4] Add more styling of error messages Date: Sun, 05 Apr 2026 05:28:37 -0600 Message-Id: <20260405-more-error-style-v1-0-6c04da718875@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAGVH0mkC/x3MQQrCQAxG4auUrA1Oqxb0KuIiM/1tA3ZGkiJK6 d0dXX6L91ZymMLp0qxkeKlryRXtrqE0SR7BOlRTF7o+HMOJ52JgmBVjXz4PcEiHGHu08SwD1ex puOv7v7zeqqM4OJrkNP1GxXTUvJ/FFxht2xegdKwfggAAAA== X-Change-ID: 20260405-more-error-style-0c3bb6e1b9ad To: gdb-patches@sourceware.org Cc: Tom Tromey <tom@tromey.com> X-Mailer: b4 0.14.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1w9Lef-00000001QMu-1mVQ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net ([192.168.122.1]) [75.166.225.82]:42722 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGstiUwnOrw31T76efYMD/6b1I+j9uz+QXBJx9N0vLw/XHBhr5eF/r01w88KDXkZHsZgX5Sq5HgEdivUGoElupsfh4hNFQ4I/yIRWUbHDCZWopFm0sv1 /hHJBpz8lgGwFHPUx0PjkRBJUiLjwDnQ67EDXMHkNrakXIDckLgt3m6zGEO12GmO2zIiFOguwI1MONg8aJ1BKsWBXFS4lwkRm5Q= X-Spam-Status: No, score=-3006.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, TXREP, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
Add more styling of error messages
|
|
Message
Tom Tromey
April 5, 2026, 11:28 a.m. UTC
This series adds more styling of error messages. I searched through
error messages for common patterns to find the places to edit. So, I
have probably missed a few.
I fixed up some quoting in the "command style" patch, but in other
spots I left it alone.
I didn't write new tests. I don't know how anyone else feels about
this but I tend to think that testing the styling of error messages is
overkill.
There are still more styles that could be applied, for instance line
numbers. Also I discovered that the previous fix to allow error() to
be styled did not apply to throw_error et al. So, some more work
there is needed.
Regression tested on x86-64 Fedora 40.
Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (4):
Add command styling to error messages
Add filename styling to error messages
Add variable styling to error messages
Add function styling to error messages
gdb/ada-exp.y | 8 +++--
gdb/ada-tasks.c | 10 ++++---
gdb/amd64-linux-tdep.c | 5 ++--
gdb/breakpoint.c | 50 +++++++++++++++++++++-----------
gdb/c-exp.y | 10 +++++--
gdb/cli/cli-cmds.c | 35 ++++++++++++++--------
gdb/cli/cli-dump.c | 21 +++++++++-----
gdb/cli/cli-script.c | 33 ++++++++++++++-------
gdb/cli/cli-utils.c | 18 ++++++++----
gdb/coffread.c | 19 ++++++++----
gdb/compile/compile-object-load.c | 36 +++++++++++++----------
gdb/compile/compile.c | 6 ++--
gdb/corelow.c | 10 ++++---
gdb/ctfread.c | 16 ++++++----
gdb/d-exp.y | 4 ++-
gdb/dwarf2/ada-imported.c | 6 ++--
gdb/dwarf2/dwz.c | 9 +++---
gdb/eval.c | 9 ++++--
gdb/exec.c | 14 +++++----
gdb/findvar.c | 4 ++-
gdb/gcore.c | 9 ++++--
gdb/gdb_bfd.c | 12 +++++---
gdb/guile/guile.c | 4 ++-
gdb/inf-child.c | 3 +-
gdb/infcall.c | 58 ++++++++++++++++++++++---------------
gdb/infcmd.c | 6 ++--
gdb/linespec.c | 1 +
gdb/linux-nat.c | 4 ++-
gdb/maint.c | 3 +-
gdb/parse.c | 4 ++-
gdb/printcmd.c | 11 +++----
gdb/python/python.c | 3 +-
gdb/record-btrace.c | 4 ++-
gdb/record-full.c | 25 +++++++++-------
gdb/record.c | 6 ++--
gdb/remote-fileio.c | 11 +++++--
gdb/remote.c | 20 +++++++++----
gdb/rust-lang.c | 6 ++--
gdb/skip.c | 5 ++--
gdb/solib-aix.c | 16 ++++++----
gdb/solib-darwin.c | 7 +++--
gdb/solib.c | 14 +++++----
gdb/symfile-mem.c | 16 +++++++---
gdb/symfile.c | 30 +++++++++++--------
gdb/symmisc.c | 3 +-
gdb/symtab.c | 3 +-
gdb/target.c | 41 +++++++++++++++++---------
gdb/testsuite/gdb.base/commands.exp | 3 +-
gdb/testsuite/gdb.base/default.exp | 2 +-
gdb/tracectf.c | 16 ++++++----
gdb/tracefile-tfile.c | 6 ++--
gdb/utils.c | 4 ++-
gdb/valops.c | 29 +++++++++++--------
gdb/xcoffread.c | 6 ++--
gdb/xml-support.c | 5 +++-
55 files changed, 465 insertions(+), 254 deletions(-)
---
base-commit: 2ec5e53d96e3def7ee11966fd07ae215be84515a
change-id: 20260405-more-error-style-0c3bb6e1b9ad
Best regards,
Comments
Tom Tromey <tom@tromey.com> writes: > This series adds more styling of error messages. I searched through > error messages for common patterns to find the places to edit. So, I > have probably missed a few. > > I fixed up some quoting in the "command style" patch, but in other > spots I left it alone. > > I didn't write new tests. I don't know how anyone else feels about > this but I tend to think that testing the styling of error messages is > overkill. > > There are still more styles that could be applied, for instance line > numbers. Also I discovered that the previous fix to allow error() to > be styled did not apply to throw_error et al. So, some more work > there is needed. > > Regression tested on x86-64 Fedora 40. I've not checked every single change, but I looked through a random sampling, and it all looks good. Nice to see more styling being added. Approved-By: Andrew Burgess <aburgess@redhat.com> Thanks, Andrew > > Signed-off-by: Tom Tromey <tom@tromey.com> > --- > Tom Tromey (4): > Add command styling to error messages > Add filename styling to error messages > Add variable styling to error messages > Add function styling to error messages > > gdb/ada-exp.y | 8 +++-- > gdb/ada-tasks.c | 10 ++++--- > gdb/amd64-linux-tdep.c | 5 ++-- > gdb/breakpoint.c | 50 +++++++++++++++++++++----------- > gdb/c-exp.y | 10 +++++-- > gdb/cli/cli-cmds.c | 35 ++++++++++++++-------- > gdb/cli/cli-dump.c | 21 +++++++++----- > gdb/cli/cli-script.c | 33 ++++++++++++++------- > gdb/cli/cli-utils.c | 18 ++++++++---- > gdb/coffread.c | 19 ++++++++---- > gdb/compile/compile-object-load.c | 36 +++++++++++++---------- > gdb/compile/compile.c | 6 ++-- > gdb/corelow.c | 10 ++++--- > gdb/ctfread.c | 16 ++++++---- > gdb/d-exp.y | 4 ++- > gdb/dwarf2/ada-imported.c | 6 ++-- > gdb/dwarf2/dwz.c | 9 +++--- > gdb/eval.c | 9 ++++-- > gdb/exec.c | 14 +++++---- > gdb/findvar.c | 4 ++- > gdb/gcore.c | 9 ++++-- > gdb/gdb_bfd.c | 12 +++++--- > gdb/guile/guile.c | 4 ++- > gdb/inf-child.c | 3 +- > gdb/infcall.c | 58 ++++++++++++++++++++++--------------- > gdb/infcmd.c | 6 ++-- > gdb/linespec.c | 1 + > gdb/linux-nat.c | 4 ++- > gdb/maint.c | 3 +- > gdb/parse.c | 4 ++- > gdb/printcmd.c | 11 +++---- > gdb/python/python.c | 3 +- > gdb/record-btrace.c | 4 ++- > gdb/record-full.c | 25 +++++++++------- > gdb/record.c | 6 ++-- > gdb/remote-fileio.c | 11 +++++-- > gdb/remote.c | 20 +++++++++---- > gdb/rust-lang.c | 6 ++-- > gdb/skip.c | 5 ++-- > gdb/solib-aix.c | 16 ++++++---- > gdb/solib-darwin.c | 7 +++-- > gdb/solib.c | 14 +++++---- > gdb/symfile-mem.c | 16 +++++++--- > gdb/symfile.c | 30 +++++++++++-------- > gdb/symmisc.c | 3 +- > gdb/symtab.c | 3 +- > gdb/target.c | 41 +++++++++++++++++--------- > gdb/testsuite/gdb.base/commands.exp | 3 +- > gdb/testsuite/gdb.base/default.exp | 2 +- > gdb/tracectf.c | 16 ++++++---- > gdb/tracefile-tfile.c | 6 ++-- > gdb/utils.c | 4 ++- > gdb/valops.c | 29 +++++++++++-------- > gdb/xcoffread.c | 6 ++-- > gdb/xml-support.c | 5 +++- > 55 files changed, 465 insertions(+), 254 deletions(-) > --- > base-commit: 2ec5e53d96e3def7ee11966fd07ae215be84515a > change-id: 20260405-more-error-style-0c3bb6e1b9ad > > Best regards, > -- > Tom Tromey <tom@tromey.com>
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> I've not checked every single change, but I looked through a random
Andrew> sampling, and it all looks good. Nice to see more styling being added.
Andrew> Approved-By: Andrew Burgess <aburgess@redhat.com>
Thanks.
I went through the patches again and found one typo which I've fixed:
- styled_string (command_style.style (), "while-steppinge"));
+ styled_string (command_style.style (), "while-stepping"));
I'm going to check it in now.
Tom