/* Generic symbol file reading for the GNU debugger, GDB.
- Copyright (C) 1990-2021 Free Software Foundation, Inc.
+ Copyright (C) 1990-2022 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
#include "regcache.h"
#include "filenames.h" /* for DOSish file names */
#include "gdb-stabs.h"
-#include "gdb_obstack.h"
+#include "gdbsupport/gdb_obstack.h"
#include "completer.h"
#include "bcache.h"
#include "hashtab.h"
#include "gdbsupport/selftest.h"
#include "cli/cli-style.h"
#include "gdbsupport/forward-scope-exit.h"
+#include "gdbsupport/buildargv.h"
#include <sys/types.h>
#include <fcntl.h>
if (separate_debug_file_debug)
{
- printf_filtered (_(" Trying %s..."), name.c_str ());
- gdb_flush (gdb_stdout);
+ fprintf_filtered (gdb_stdlog, _(" Trying %s..."), name.c_str ());
+ gdb_flush (gdb_stdlog);
}
gdb_bfd_ref_ptr abfd (gdb_bfd_open (name.c_str (), gnutarget));
if (abfd == NULL)
{
if (separate_debug_file_debug)
- printf_filtered (_(" no, unable to open.\n"));
+ fprintf_filtered (gdb_stdlog, _(" no, unable to open.\n"));
return 0;
}
&& abfd_stat.st_ino == parent_stat.st_ino)
{
if (separate_debug_file_debug)
- printf_filtered (_(" no, same file as the objfile.\n"));
+ fprintf_filtered (gdb_stdlog,
+ _(" no, same file as the objfile.\n"));
return 0;
}
if (!file_crc_p)
{
if (separate_debug_file_debug)
- printf_filtered (_(" no, error computing CRC.\n"));
+ fprintf_filtered (gdb_stdlog, _(" no, error computing CRC.\n"));
return 0;
}
if (!gdb_bfd_crc (parent_objfile->obfd, &parent_crc))
{
if (separate_debug_file_debug)
- printf_filtered (_(" no, error computing CRC.\n"));
+ fprintf_filtered (gdb_stdlog,
+ _(" no, error computing CRC.\n"));
return 0;
}
name.c_str (), objfile_name (parent_objfile));
if (separate_debug_file_debug)
- printf_filtered (_(" no, CRC doesn't match.\n"));
+ fprintf_filtered (gdb_stdlog, _(" no, CRC doesn't match.\n"));
return 0;
}
if (separate_debug_file_debug)
- printf_filtered (_(" yes!\n"));
+ fprintf_filtered (gdb_stdlog, _(" yes!\n"));
return 1;
}
unsigned long crc32, struct objfile *objfile)
{
if (separate_debug_file_debug)
- printf_filtered (_("\nLooking for separate debug info (debug link) for "
- "%s\n"), objfile_name (objfile));
+ fprintf_filtered (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_unfiltered (_("add symbol table from file \"%s\""),
- filename.get ());
+ printf_filtered (_("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_unfiltered (_(" at\n"));
+ printf_filtered (_(" at\n"));
addr = parse_and_eval_address (val);
/* Here we store the section offsets in the order they were
so we can't determine what section names are valid. */
}
if (seen_offset)
- printf_unfiltered (_("%s offset by %s\n"),
- (section_addrs.empty ()
- ? _(" with all sections")
- : _("with other sections")),
- paddress (gdbarch, offset));
+ printf_filtered (_("%s offset by %s\n"),
+ (section_addrs.empty ()
+ ? _(" with all sections")
+ : _("with other sections")),
+ paddress (gdbarch, offset));
else if (section_addrs.empty ())
- printf_unfiltered ("\n");
+ printf_filtered ("\n");
if (from_tty && (!query ("%s", "")))
error (_("Not confirmed."));
sec2))
{
if (info_verbose)
- printf_unfiltered (_("Note: section %s unmapped by overlap\n"),
- bfd_section_name (sec2->the_bfd_section));
+ printf_filtered (_("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_unfiltered (_("Automatic overlay debugging enabled."));
+ printf_filtered (_("Automatic overlay debugging enabled."));
}
/* Function: overlay_manual_command
overlay_debugging = ovly_on;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_unfiltered (_("Overlay debugging enabled."));
+ printf_filtered (_("Overlay debugging enabled."));
}
/* Function: overlay_off_command
overlay_debugging = ovly_off;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_unfiltered (_("Overlay debugging disabled."));
+ printf_filtered (_("Overlay debugging disabled."));
}
static void