From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id S2DaLAaB2WmVTBEAWB0awg (envelope-from ) for ; Fri, 10 Apr 2026 19:00:22 -0400 Authentication-Results: simark.ca; 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=CZK703cI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 86AC11E0C3; Fri, 10 Apr 2026 19:00:22 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7AEE61E04F for ; Fri, 10 Apr 2026 19:00:20 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id C42254BA23CA for ; Fri, 10 Apr 2026 23:00:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C42254BA23CA 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=CZK703cI Received: from omta40.uswest2.a.cloudfilter.net (omta40.uswest2.a.cloudfilter.net [35.89.44.39]) by sourceware.org (Postfix) with ESMTPS id 239224BA2E1E for ; Fri, 10 Apr 2026 22:59:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 239224BA2E1E 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 239224BA2E1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775861983; cv=none; b=LUs5/z9NZgmoL4nqzpVnNKM4aHK89B6zpgWmSoSv2ryZFd1WvqTQaCthQJPyJ2B6lsXDHxDwqL0/lGnYcQZXE0gIHJP3W4o1EVDFPvj8IIb9xoholOWES72CdhNsTJaNhJ8eg/r54V6QDb5QNhlhKQHgv5T+JgC1jGl9/qUUy/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775861983; c=relaxed/simple; bh=JTWRqKNWEGFNCZgwNVUUBYd2jTNcdRnFYVBrJ43VuQw=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=dU0iwSTDM5L6E5pjV9fP/KdJKln0khSoi8FVTegdimas6VFKdu/cONeCHTzqrzs82sHxqcS7qMaJi3TsFnGzkP9YfjnNbW7BF2Kg4WENOiS87JN/DdmVEWZx+j9y/+dsJ56Kc1yLhV2P/HFH0bEgP4kYFKudgkowvBv/J5G8eQA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 239224BA2E1E Received: from eig-obgw-6007b.ext.cloudfilter.net ([10.0.30.166]) by cmsmtp with ESMTPS id BGgNwNUIeshqQBKpCw0ogk; Fri, 10 Apr 2026 22:59:42 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id BKpBwNnMc36heBKpBwDeqC; Fri, 10 Apr 2026 22:59:41 +0000 X-Authority-Analysis: v=2.4 cv=PN8P+eqC c=1 sm=1 tr=0 ts=69d980dd a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=ItBw4LHWJt0A:10 a=z2tWkf24O_DxnLXoaFUA:9 a=QEXdDO2ut3YA:10 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3n7eMwKqQ9rqJRax9rHwkAPQ18WxUvrvyqeatKzKhDo=; b=CZK703cIgG23UNwBaRBNNOv4rj 2Uhy4oLvJDrjwK1cwqjAftfAJEerCvZ5o9VPK/1JqVHA8tpNLZPDGu1exXLxLKDJs6Zob8bhQGT5N mZWweeeiL0FUSPMxVS3M6LRiG; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:49954 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 ) id 1wBKpB-00000001tnB-0qSG; Fri, 10 Apr 2026 16:59:41 -0600 From: Tom Tromey Date: Fri, 10 Apr 2026 16:59:43 -0600 Subject: [PATCH 3/5] Use command style with throw_error MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260410-unify-exceptions-v1-3-ea64dae971a8@tromey.com> References: <20260410-unify-exceptions-v1-0-ea64dae971a8@tromey.com> In-Reply-To: <20260410-unify-exceptions-v1-0-ea64dae971a8@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey 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: 1wBKpB-00000001tnB-0qSG 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]:49954 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfM/pXvyWqVj8pI+OxsiNlIwHWFwWyhfUFcWDGF/YRCscD9veFHOjJcycGzmLi4EsxvZDxE2MhkqFs81BffZP1HwG01nXW941Z0K9oL1QFFksvj19YbhK ifa50408pe6uHfVOWt4xhBOTe0HlrSuxD1kYusuZ9o00SoWQsqXtWfjWndLltry20NuSzEOpHmhT5OynO22QiKJTiDriATktvg0= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org This changes some calls to throw_error to use command_style. --- gdb/linespec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/linespec.c b/gdb/linespec.c index 435b4fbcd2f..493ad47e76a 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1530,7 +1530,8 @@ symbol_not_found_error (const char *symbol, const char *filename) && !current_program_space->has_partial_symbols () && !current_program_space->has_minimal_symbols ()) throw_error (NOT_FOUND_ERROR, - _("No symbol table is loaded. Use the \"file\" command.")); + _("No symbol table is loaded. Use the \"%ps\" command."), + styled_string (command_style.style (), "file")); /* If SYMBOL starts with '$', the user attempted to either lookup a function/variable in his code starting with '$' or an internal @@ -3660,7 +3661,8 @@ symtabs_from_filename (const char *filename, && !current_program_space->has_partial_symbols ()) throw_error (NOT_FOUND_ERROR, _("No symbol table is loaded. " - "Use the \"file\" command.")); + "Use the \"%ps\" command."), + styled_string (command_style.style (), "file")); source_file_not_found_error (filename); } -- 2.49.0