]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use command style with throw_error
authorTom Tromey <tom@tromey.com>
Wed, 8 Apr 2026 00:25:22 +0000 (18:25 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 8 May 2026 19:02:32 +0000 (13:02 -0600)
This changes some calls to throw_error to use command_style.

gdb/linespec.c

index daa6a1abb5c7454883fe4e407aac9462144f899d..c9c442ad125621e110e30292e76f29f40dd4fd84 100644 (file)
@@ -1526,7 +1526,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
@@ -3653,7 +3654,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);
     }