Add line-number styling

This patch adds separate styling for line numbers.  That is, whenever
gdb prints a source line number, it uses this style.

v2 includes a change to ensure that %ps works in query.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Reviewed-by: Keith Seitz <keiths@redhat.com>
This commit is contained in:
Tom Tromey
2024-09-14 15:07:17 -06:00
parent 7ecf0250f7
commit 887ae0cf2b
28 changed files with 131 additions and 55 deletions

View File

@@ -1103,7 +1103,9 @@ jump_command (const char *arg, int from_tty)
find_pc_mapped_section (sal.pc));
if (fn != nullptr && sfn != fn)
{
if (!query (_("Line %d is not in `%s'. Jump anyway? "), sal.line,
if (!query (_("Line %ps is not in `%s'. Jump anyway? "),
styled_string (line_number_style.style (),
pulongest (sal.line)),
fn->print_name ()))
{
error (_("Not confirmed."));