Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 3/5] Use command style with throw_error
Date: Fri, 10 Apr 2026 16:59:43 -0600	[thread overview]
Message-ID: <20260410-unify-exceptions-v1-3-ea64dae971a8@tromey.com> (raw)
In-Reply-To: <20260410-unify-exceptions-v1-0-ea64dae971a8@tromey.com>

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


  parent reply	other threads:[~2026-04-10 23:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 22:59 [PATCH 0/5] Allow throw_* functions to style message Tom Tromey
2026-04-10 22:59 ` [PATCH 1/5] Allow styling when using throw_* functions Tom Tromey
2026-04-10 22:59 ` [PATCH 2/5] Use file- and line-styling with throw_error Tom Tromey
2026-04-10 22:59 ` Tom Tromey [this message]
2026-04-10 22:59 ` [PATCH 4/5] Use function style " Tom Tromey
2026-04-10 22:59 ` [PATCH 5/5] Use address " Tom Tromey
2026-05-08 19:02 ` [PATCH 0/5] Allow throw_* functions to style message 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=20260410-unify-exceptions-v1-3-ea64dae971a8@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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