[binutils-gdb] Use command style with throw_error
Tom Tromey via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9f2abab1c94e0cc0664580c758838ce819161a5e commit 9f2abab1c94e0cc0664580c758838ce819161a5e Author: Tom Tromey <[email protected]> Date: Tue Apr 7 18:25:22 2026 -0600 Use command style with throw_error This changes some calls to throw_error to use command_style. Diff: --- gdb/linespec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/linespec.c b/gdb/linespec.c index daa6a1abb5c..c9c442ad125 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -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); }