diff options
author | Tom Tromey <tom@tromey.com> | 2024-09-14 15:07:17 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-09-30 13:23:35 -0600 |
commit | 887ae0cf2be5cb10d68b14f16df8faf666f4e43b (patch) | |
tree | f7c92c61df329414d9e57a31c9f034750992e7ec /gdb/cli/cli-style.c | |
parent | 7ecf0250f7f0868f3b828ffadd47d0e5f2dbd875 (diff) | |
download | binutils-887ae0cf2be5cb10d68b14f16df8faf666f4e43b.zip binutils-887ae0cf2be5cb10d68b14f16df8faf666f4e43b.tar.gz binutils-887ae0cf2be5cb10d68b14f16df8faf666f4e43b.tar.bz2 |
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>
Diffstat (limited to 'gdb/cli/cli-style.c')
-rw-r--r-- | gdb/cli/cli-style.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/cli/cli-style.c b/gdb/cli/cli-style.c index 5928998..36a8bd9 100644 --- a/gdb/cli/cli-style.c +++ b/gdb/cli/cli-style.c @@ -126,6 +126,10 @@ cli_style_option disasm_comment_style ("comment", ui_file_style::WHITE, /* See cli-style.h. */ +cli_style_option line_number_style ("line-number", ui_file_style::DIM); + +/* See cli-style.h. */ + cli_style_option::cli_style_option (const char *name, ui_file_style::basic_color fg, ui_file_style::intensity intensity) @@ -529,6 +533,14 @@ then this style has no effect."), &style_disasm_show_list, false); + line_number_style.add_setshow_commands (no_class, _("\ +Line number display styling.\n\ +Configure colors and display intensity for line numbers\n\ +The \"line-number\" style is used when GDB displays line numbers\n\ +coming from your source code."), + &style_set_list, &style_show_list, + false); + /* Setup 'disassembler address' style and 'disassembler symbol' style, these are aliases for 'address' and 'function' styles respectively. */ add_alias_cmd ("address", address_prefix_cmds.set, no_class, 0, |