From 887ae0cf2be5cb10d68b14f16df8faf666f4e43b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 14 Sep 2024 15:07:17 -0600 Subject: 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 Reviewed-by: Keith Seitz --- gdb/infcmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdb/infcmd.c') diff --git a/gdb/infcmd.c b/gdb/infcmd.c index 5e9af41..74873b9 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -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.")); -- cgit v1.1