+2019-10-01 Tom Tromey <tom@tromey.com>
+
+ * stack.c (print_frame, info_frame_command_core): Use
+ styled_string.
+ * linux-thread-db.c (try_thread_db_load_1)
+ (try_thread_db_load_from_pdir_1): Use styled_string.
+ * auto-load.c (file_is_auto_load_safe, execute_script_contents)
+ (auto_load_section_scripts, info_auto_load_local_gdbinit)
+ (maybe_print_unsupported_script_warning)
+ (maybe_print_script_not_found_warning): Use styled_string.
+ * ada-lang.c (user_select_syms): Use styled_string.
+
2019-10-01 Tom Tromey <tom@tromey.com>
* p-lang.c (pascal_printstr): Use metadata style.
#include "gdb/section-scripts.h"
#include <algorithm>
#include "gdbsupport/pathstuff.h"
+#include "cli/cli-style.h"
/* The section to look in for auto-loaded scripts (in file formats that
support sections).
if (filename_is_in_auto_load_safe_path_vec (filename, &filename_real))
return 1;
- warning (_("File \"%s\" auto-loading has been declined by your "
+ warning (_("File \"%ps\" auto-loading has been declined by your "
"`auto-load safe-path' set to \"%s\"."),
- filename_real.get (), auto_load_safe_path);
+ styled_string (file_name_style.style (), filename_real.get ()),
+ auto_load_safe_path);
if (!advice_printed)
{
/* We don't throw an error, the program is still debuggable. */
warning (_("\
Missing/bad script name in entry at offset %u in section %s\n\
-of file %s."),
- offset, section_name, objfile_name (objfile));
+of file %ps."),
+ offset, section_name,
+ styled_string (file_name_style.style (),
+ objfile_name (objfile)));
return;
}
script_text = newline + 1;
return;
if (!bfd_get_full_section_contents (abfd, scripts_sect, &data))
- warning (_("Couldn't read %s section of %s"),
- section_name, bfd_get_filename (abfd));
+ warning (_("Couldn't read %s section of %ps"),
+ section_name,
+ styled_string (file_name_style.style (),
+ bfd_get_filename (abfd)));
else
{
gdb::unique_xmalloc_ptr<bfd_byte> data_holder (data);
if (auto_load_local_gdbinit_pathname == NULL)
printf_filtered (_("Local .gdbinit file was not found.\n"));
else if (auto_load_local_gdbinit_loaded)
- printf_filtered (_("Local .gdbinit file \"%s\" has been loaded.\n"),
- auto_load_local_gdbinit_pathname);
+ printf_filtered (_("Local .gdbinit file \"%ps\" has been loaded.\n"),
+ styled_string (file_name_style.style (),
+ auto_load_local_gdbinit_pathname));
else
- printf_filtered (_("Local .gdbinit file \"%s\" has not been loaded.\n"),
- auto_load_local_gdbinit_pathname);
+ printf_filtered (_("Local .gdbinit file \"%ps\" has not been loaded.\n"),
+ styled_string (file_name_style.style (),
+ auto_load_local_gdbinit_pathname));
}
/* Print an "unsupported script" warning if it has not already been printed.
{
warning (_("\
Unsupported auto-load script at offset %u in section %s\n\
-of file %s.\n\
+of file %ps.\n\
Use `info auto-load %s-scripts [REGEXP]' to list them."),
- offset, section_name, objfile_name (objfile),
+ offset, section_name,
+ styled_string (file_name_style.style (),
+ objfile_name (objfile)),
ext_lang_name (language));
pspace_info->unsupported_script_warning_printed = true;
}
{
warning (_("\
Missing auto-load script at offset %u in section %s\n\
-of file %s.\n\
+of file %ps.\n\
Use `info auto-load %s-scripts [REGEXP]' to list them."),
- offset, section_name, objfile_name (objfile),
+ offset, section_name,
+ styled_string (file_name_style.style (),
+ objfile_name (objfile)),
ext_lang_name (language));
pspace_info->script_not_found_warning_printed = true;
}
#include <algorithm>
#include "gdbsupport/pathstuff.h"
#include "valprint.h"
+#include "cli/cli-style.h"
/* GNU/Linux libthread_db support.
enabled. User visible output should not depend on debug
settings. */
file = *libthread_db_search_path != '\0' ? gdb_stdout : gdb_stdlog;
- fprintf_unfiltered (file, _("Using host libthread_db library \"%s\".\n"),
- library);
+ fprintf_unfiltered (file,
+ _("Using host libthread_db library \"%ps\".\n"),
+ styled_string (file_name_style.style (), library));
}
/* The thread library was detected. Activate the thread_db target
if (obj_name[0] != '/')
{
warning (_("Expected absolute pathname for libpthread in the"
- " inferior, but got %s."), obj_name);
+ " inferior, but got %ps."),
+ styled_string (file_name_style.style (), obj_name));
return false;
}