mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-14 12:04:04 +08:00
Style the "Reading symbols" message
The "Reading symbols" message does not use ui-out (perhaps it should?), so this styles it using the low-level API. gdb/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * symfile.c (symbol_file_add_with_addrs): Style file name. gdb/testsuite/ChangeLog 2018-12-28 Tom Tromey <tom@tromey.com> * gdb.base/style.exp: Add test for styling of "Reading symbols" message.
This commit is contained in:
parent
d47032b7ca
commit
47fd17cdc1
@ -1,3 +1,7 @@
|
||||
2018-12-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* symfile.c (symbol_file_add_with_addrs): Style file name.
|
||||
|
||||
2018-12-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* top.c (print_gdb_version): Style gdb version number.
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include "cli/cli-utils.h"
|
||||
#include "common/byte-vector.h"
|
||||
#include "selftest.h"
|
||||
#include "cli/cli-style.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
@ -1110,7 +1111,11 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name,
|
||||
if (deprecated_pre_add_symbol_hook)
|
||||
deprecated_pre_add_symbol_hook (name);
|
||||
else
|
||||
printf_filtered (_("Reading symbols from %s...\n"), name);
|
||||
{
|
||||
puts_filtered (_("Reading symbols from "));
|
||||
fputs_styled (name, file_name_style.style (), gdb_stdout);
|
||||
puts_filtered ("...\n");
|
||||
}
|
||||
}
|
||||
syms_from_objfile (objfile, addrs, add_flags);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2018-12-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* gdb.base/style.exp: Add test for styling of "Reading symbols"
|
||||
message.
|
||||
|
||||
2018-12-28 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* gdb.base/style.exp: Add test for version number styling.
|
||||
|
@ -50,4 +50,8 @@ save_vars { env(TERM) } {
|
||||
|
||||
gdb_test "" "\033\\\[35;1mGNU gdb.*\033\\\[m.*" \
|
||||
"version is styled"
|
||||
|
||||
set quoted [string_to_regexp $binfile]
|
||||
gdb_test "file $binfile" \
|
||||
"Reading symbols from \033\\\[32m${quoted}\033\\\[m..." \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user