if (deprecated_pre_add_symbol_hook)
deprecated_pre_add_symbol_hook (name);
else
- printf_filtered (_("Reading symbols from %ps...\n"),
- styled_string (file_name_style.style (), name));
+ gdb_printf (_("Reading symbols from %ps...\n"),
+ styled_string (file_name_style.style (), name));
}
syms_from_objfile (objfile, addrs, add_flags);
if ((flags & OBJF_READNOW))
{
if (should_print)
- printf_filtered (_("Expanding full symbols from %ps...\n"),
- styled_string (file_name_style.style (), name));
+ gdb_printf (_("Expanding full symbols from %ps...\n"),
+ styled_string (file_name_style.style (), name));
objfile->expand_all_symtabs ();
}
file, and so printing it twice is just redundant. */
if (should_print && !objfile_has_symbols (objfile)
&& objfile->separate_debug_objfile == nullptr)
- printf_filtered (_("(No debugging symbols found in %ps)\n"),
- styled_string (file_name_style.style (), name));
+ gdb_printf (_("(No debugging symbols found in %ps)\n"),
+ styled_string (file_name_style.style (), name));
if (should_print)
{
gdb_assert (current_program_space->symfile_object_file == NULL);
if (from_tty)
- printf_filtered (_("No symbol file now.\n"));
+ gdb_printf (_("No symbol file now.\n"));
}
/* See symfile.h. */
if (separate_debug_file_debug)
{
- fprintf_filtered (gdb_stdlog, _(" Trying %s..."), name.c_str ());
+ gdb_printf (gdb_stdlog, _(" Trying %s..."), name.c_str ());
gdb_flush (gdb_stdlog);
}
if (abfd == NULL)
{
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog, _(" no, unable to open.\n"));
+ gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
return 0;
}
&& abfd_stat.st_ino == parent_stat.st_ino)
{
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog,
- _(" no, same file as the objfile.\n"));
+ gdb_printf (gdb_stdlog,
+ _(" no, same file as the objfile.\n"));
return 0;
}
if (!file_crc_p)
{
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog, _(" no, error computing CRC.\n"));
+ gdb_printf (gdb_stdlog, _(" no, error computing CRC.\n"));
return 0;
}
if (!gdb_bfd_crc (parent_objfile->obfd, &parent_crc))
{
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog,
- _(" no, error computing CRC.\n"));
+ gdb_printf (gdb_stdlog,
+ _(" no, error computing CRC.\n"));
return 0;
}
name.c_str (), objfile_name (parent_objfile));
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog, _(" no, CRC doesn't match.\n"));
+ gdb_printf (gdb_stdlog, _(" no, CRC doesn't match.\n"));
return 0;
}
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog, _(" yes!\n"));
+ gdb_printf (gdb_stdlog, _(" yes!\n"));
return 1;
}
show_debug_file_directory (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file,
- _("The directory where separate debug "
- "symbols are searched for is \"%s\".\n"),
- value);
+ gdb_printf (file,
+ _("The directory where separate debug "
+ "symbols are searched for is \"%s\".\n"),
+ value);
}
#if ! defined (DEBUG_SUBDIRECTORY)
unsigned long crc32, struct objfile *objfile)
{
if (separate_debug_file_debug)
- fprintf_filtered (gdb_stdlog,
- _("\nLooking for separate debug info (debug link) for "
- "%s\n"), objfile_name (objfile));
+ gdb_printf (gdb_stdlog,
+ _("\nLooking for separate debug info (debug link) for "
+ "%s\n"), objfile_name (objfile));
/* First try in the same directory as the original file. */
std::string debugfile = dir;
statements because hex_string returns a local static
string. */
- printf_filtered (_("add symbol table from file \"%s\""),
- filename.get ());
+ gdb_printf (_("add symbol table from file \"%s\""),
+ filename.get ());
section_addr_info section_addrs;
std::vector<sect_opt>::const_iterator it = sect_opts.begin ();
if (!seen_addr)
const char *sec = it->name;
if (section_addrs.empty ())
- printf_filtered (_(" at\n"));
+ gdb_printf (_(" at\n"));
addr = parse_and_eval_address (val);
/* Here we store the section offsets in the order they were
index is not used for any other purpose.
*/
section_addrs.emplace_back (addr, sec, section_addrs.size ());
- printf_filtered ("\t%s_addr = %s\n", sec,
- paddress (gdbarch, addr));
+ gdb_printf ("\t%s_addr = %s\n", sec,
+ paddress (gdbarch, addr));
/* The object's sections are initialized when a
call is made to build_objfile_section_table (objfile).
so we can't determine what section names are valid. */
}
if (seen_offset)
- printf_filtered (_("%s offset by %s\n"),
- (section_addrs.empty ()
- ? _(" with all sections")
- : _("with other sections")),
- paddress (gdbarch, offset));
+ gdb_printf (_("%s offset by %s\n"),
+ (section_addrs.empty ()
+ ? _(" with all sections")
+ : _("with other sections")),
+ paddress (gdbarch, offset));
else if (section_addrs.empty ())
- printf_filtered ("\n");
+ gdb_printf ("\n");
if (from_tty && (!query ("%s", "")))
error (_("Not confirmed."));
if (res != 0)
{
/* FIXME, should use print_sys_errmsg but it's not filtered. */
- printf_filtered (_("`%s' has disappeared; keeping its symbols.\n"),
- objfile_name (objfile));
+ gdb_printf (_("`%s' has disappeared; keeping its symbols.\n"),
+ objfile_name (objfile));
continue;
}
new_modtime = new_statbuf.st_mtime;
if (new_modtime != objfile->mtime)
{
- printf_filtered (_("`%s' has changed; re-reading symbols.\n"),
- objfile_name (objfile));
+ gdb_printf (_("`%s' has changed; re-reading symbols.\n"),
+ objfile_name (objfile));
/* There are various functions like symbol_file_add,
symfile_bfd_open, syms_from_objfile, etc., which might
const int should_print = (print_symbol_loading_p (from_tty, mainline, 1)
&& readnow_symbol_files);
if (should_print)
- printf_filtered (_("Expanding full symbols from %ps...\n"),
- styled_string (file_name_style.style (),
- objfile_name (objfile)));
+ gdb_printf (_("Expanding full symbols from %ps...\n"),
+ styled_string (file_name_style.style (),
+ objfile_name (objfile)));
objfile->expand_all_symtabs ();
}
if (!objfile_has_symbols (objfile))
{
gdb_stdout->wrap_here (0);
- printf_filtered (_("(no debugging symbols found)\n"));
+ gdb_printf (_("(no debugging symbols found)\n"));
gdb_stdout->wrap_here (0);
}
show_ext_args (struct ui_file *file, int from_tty,
struct cmd_list_element *c, const char *value)
{
- fprintf_filtered (file,
- _("Mapping between filename extension "
- "and source language is \"%s\".\n"),
- value);
+ gdb_printf (file,
+ _("Mapping between filename extension "
+ "and source language is \"%s\".\n"),
+ value);
}
static void
static void
info_ext_lang_command (const char *args, int from_tty)
{
- printf_filtered (_("Filename extensions and the languages they represent:"));
- printf_filtered ("\n\n");
+ gdb_printf (_("Filename extensions and the languages they represent:"));
+ gdb_printf ("\n\n");
for (const filename_language &entry : filename_language_table)
- printf_filtered ("\t%s\t- %s\n", entry.ext.c_str (),
- language_str (entry.lang));
+ gdb_printf ("\t%s\t- %s\n", entry.ext.c_str (),
+ language_str (entry.lang));
}
enum language
if (last_objfile_name.empty () || last_objfile_name != this_objfile_name)
{
last_objfile_name = this_objfile_name;
- fprintf_filtered (gdb_stdlog,
- "Creating one or more symtabs for objfile %s ...\n",
- this_objfile_name);
+ gdb_printf (gdb_stdlog,
+ "Creating one or more symtabs for objfile %s ...\n",
+ this_objfile_name);
}
- fprintf_filtered (gdb_stdlog,
- "Created symtab %s for module %s.\n",
- host_address_to_string (symtab), filename);
+ gdb_printf (gdb_stdlog,
+ "Created symtab %s for module %s.\n",
+ host_address_to_string (symtab), filename);
}
/* Add it to CUST's list of symtabs. */
if (symtab_create_debug)
{
- fprintf_filtered (gdb_stdlog,
- "Created compunit symtab %s for %s.\n",
- host_address_to_string (cu),
- cu->name);
+ gdb_printf (gdb_stdlog,
+ "Created compunit symtab %s for %s.\n",
+ host_address_to_string (cu),
+ cu->name);
}
return cu;
size = bfd_section_size (osect->the_bfd_section);
name = bfd_section_name (osect->the_bfd_section);
- printf_filtered ("Section %s, loaded at ", name);
+ gdb_printf ("Section %s, loaded at ", name);
gdb_puts (paddress (gdbarch, lma));
gdb_puts (" - ");
gdb_puts (paddress (gdbarch, lma + size));
- printf_filtered (", mapped at ");
+ gdb_printf (", mapped at ");
gdb_puts (paddress (gdbarch, vma));
gdb_puts (" - ");
gdb_puts (paddress (gdbarch, vma + size));
}
}
if (nmapped == 0)
- printf_filtered (_("No sections are mapped.\n"));
+ gdb_printf (_("No sections are mapped.\n"));
}
/* Function: map_overlay_command
sec2))
{
if (info_verbose)
- printf_filtered (_("Note: section %s unmapped by overlap\n"),
- bfd_section_name (sec2->the_bfd_section));
+ gdb_printf (_("Note: section %s unmapped by overlap\n"),
+ bfd_section_name (sec2->the_bfd_section));
sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2. */
}
return;
overlay_debugging = ovly_auto;
enable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered (_("Automatic overlay debugging enabled."));
+ gdb_printf (_("Automatic overlay debugging enabled."));
}
/* Function: overlay_manual_command
overlay_debugging = ovly_on;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered (_("Overlay debugging enabled."));
+ gdb_printf (_("Overlay debugging enabled."));
}
/* Function: overlay_off_command
overlay_debugging = ovly_off;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered (_("Overlay debugging disabled."));
+ gdb_printf (_("Overlay debugging disabled."));
}
static void
word_size = gdbarch_long_bit (gdbarch) / TARGET_CHAR_BIT;
byte_order = gdbarch_byte_order (gdbarch);
- cache_novlys = read_memory_integer (BMSYMBOL_VALUE_ADDRESS (novlys_msym),
+ cache_novlys = read_memory_integer (novlys_msym.value_address (),
4, byte_order);
cache_ovly_table
= (unsigned int (*)[4]) xmalloc (cache_novlys * sizeof (*cache_ovly_table));
- cache_ovly_table_base = BMSYMBOL_VALUE_ADDRESS (ovly_table_msym);
+ cache_ovly_table_base = ovly_table_msym.value_address ();
read_target_long_array (cache_ovly_table_base,
(unsigned int *) cache_ovly_table,
cache_novlys * 4, word_size, byte_order);
"find `_ovly_table' array\n"
"in inferior. Use `overlay manual' mode."));
- if (cache_ovly_table_base == BMSYMBOL_VALUE_ADDRESS (minsym))
+ if (cache_ovly_table_base == minsym.value_address ())
/* Then go ahead and try to look up this single section in
the cache. */
if (simple_overlay_update_1 (osect))