aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2019-09-17 17:03:28 -0600
committerTom Tromey <tom@tromey.com>2019-10-01 15:12:38 -0600
commit6a831f06e1bdf3aff6acf7ae31e2a3a9795137a5 (patch)
tree316d0ef4b369a0635a9132de2b5e63cdc2a94131 /gdb/symtab.c
parent2a3c1174c3c0db1140180fb3fc56ac324d1c0a7c (diff)
downloadgdb-6a831f06e1bdf3aff6acf7ae31e2a3a9795137a5.zip
gdb-6a831f06e1bdf3aff6acf7ae31e2a3a9795137a5.tar.gz
gdb-6a831f06e1bdf3aff6acf7ae31e2a3a9795137a5.tar.bz2
Use new %p format suffixes in gdb
This changes various spots in gdb to use the new %p format suffixes. gdb/ChangeLog 2019-10-01 Pedro Alves <palves@redhat.com> Tom Tromey <tom@tromey.com> * symtab.c (print_symbol_info): Use %ps. (print_msymbol_info): Use %ps. * symfile.c (symbol_file_add_with_addrs): Use %ps. * printcmd.c (print_variable_and_value): Use %ps. * macrocmd.c (show_pp_source_pos): Use %ps. * infrun.c (print_exited_reason): Use ui_out::message. * breakpoint.c (watchpoint_check, print_one_breakpoint_location) (describe_other_breakpoints): Use ui_out::message and new formats. (say_where): Use new formats. (bkpt_print_it, tracepoint_print_one_detail): Use ui_out::message and new formats.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 6ea9fc6..df6b87f 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -4748,9 +4748,9 @@ print_symbol_info (enum search_domain kind,
if (filename_cmp (last, s_filename) != 0)
{
- fputs_filtered ("\nFile ", gdb_stdout);
- fputs_styled (s_filename, file_name_style.style (), gdb_stdout);
- fputs_filtered (":\n", gdb_stdout);
+ printf_filtered (_("\nFile %ps:\n"),
+ styled_string (file_name_style.style (),
+ s_filename));
}
if (SYMBOL_LINE (sym) != 0)
@@ -4812,15 +4812,15 @@ print_msymbol_info (struct bound_minimal_symbol msymbol)
else
tmp = hex_string_custom (BMSYMBOL_VALUE_ADDRESS (msymbol),
16);
- fputs_styled (tmp, address_style.style (), gdb_stdout);
- fputs_filtered (" ", gdb_stdout);
- if (msymbol.minsym->text_p ())
- fputs_styled (MSYMBOL_PRINT_NAME (msymbol.minsym),
- function_name_style.style (),
- gdb_stdout);
- else
- fputs_filtered (MSYMBOL_PRINT_NAME (msymbol.minsym), gdb_stdout);
- fputs_filtered ("\n", gdb_stdout);
+
+ ui_file_style sym_style = (msymbol.minsym->text_p ()
+ ? function_name_style.style ()
+ : ui_file_style ());
+
+ printf_filtered (_("%ps %ps\n"),
+ styled_string (address_style.style (), tmp),
+ styled_string (sym_style,
+ MSYMBOL_PRINT_NAME (msymbol.minsym)));
}
/* This is the guts of the commands "info functions", "info types", and