diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-10-01 16:55:28 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-10-02 10:10:20 +0100 |
commit | bcb92f7ba7b22ac882c000cabfd7ca8bea47c184 (patch) | |
tree | 8b1010835a0474decb45256ecd4f6e10725b8e5d /gdb/cli | |
parent | 042f14505edb496955306595cadc269f72eaf239 (diff) | |
download | binutils-bcb92f7ba7b22ac882c000cabfd7ca8bea47c184.zip binutils-bcb92f7ba7b22ac882c000cabfd7ca8bea47c184.tar.gz binutils-bcb92f7ba7b22ac882c000cabfd7ca8bea47c184.tar.bz2 |
gdb: more file name styling
While looking at the recent line number styling commit I noticed a few
places where we could add more file name styling. So lets do that.
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-cmds.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 2e57b0d..ea2e156 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -1016,16 +1016,23 @@ edit_command (const char *arg, int from_tty) gdbarch = sal.symtab->compunit ()->objfile ()->arch (); sym = find_pc_function (sal.pc); if (sym) - gdb_printf ("%s is in %s (%s:%d).\n", - paddress (gdbarch, sal.pc), - sym->print_name (), - symtab_to_filename_for_display (sal.symtab), - sal.line); + gdb_printf ("%ps is in %ps (%ps:%ps).\n", + styled_string (address_style.style (), + paddress (gdbarch, sal.pc)), + styled_string (function_name_style.style (), + sym->print_name ()), + styled_string (file_name_style.style (), + symtab_to_filename_for_display (sal.symtab)), + styled_string (line_number_style.style (), + pulongest (sal.line))); else - gdb_printf ("%s is at %s:%d.\n", - paddress (gdbarch, sal.pc), - symtab_to_filename_for_display (sal.symtab), - sal.line); + gdb_printf ("%ps is at %ps:%ps.\n", + styled_string (address_style.style (), + paddress (gdbarch, sal.pc)), + styled_string (file_name_style.style (), + symtab_to_filename_for_display (sal.symtab)), + styled_string (line_number_style.style (), + pulongest (sal.line))); } /* If what was given does not imply a symtab, it must be an |