static int gdb_os_poll_quit (host_callback *);
-/* printf_filtered is depreciated. */
+/* gdb_printf is depreciated. */
static void gdb_os_printf_filtered (host_callback *, const char *, ...);
static void gdb_os_vprintf_filtered (host_callback *, const char *, va_list);
uint32_t l[2];
memcpy (l, buf, len);
- fprintf_unfiltered (gdb_stdlog, "0x%08x", l[0]);
+ gdb_printf (gdb_stdlog, "0x%08x", l[0]);
if (len == 8)
- fprintf_unfiltered (gdb_stdlog, " 0x%08x", l[1]);
+ gdb_printf (gdb_stdlog, " 0x%08x", l[1]);
}
else
{
int i;
for (i = 0; i < len; i++)
- fprintf_unfiltered (gdb_stdlog, "0x%02x ", buf[i]);
+ gdb_printf (gdb_stdlog, "0x%02x ", buf[i]);
}
gdb_puts ("\n", gdb_stdlog);
gdb_stdtargerr->flush ();
}
-/* GDB version of printf_filtered callback. */
+/* GDB version of gdb_printf callback. */
static void ATTRIBUTE_PRINTF (2, 3)
gdb_os_printf_filtered (host_callback * p, const char *format, ...)
buf.data (), regsize);
if (nr_bytes > 0 && nr_bytes != regsize && warn_user)
{
- fprintf_unfiltered (gdb_stderr,
- "Size of register %s (%d/%d) "
- "incorrect (%d instead of %d))",
- gdbarch_register_name (gdbarch, regno),
- regno,
- gdbarch_register_sim_regno (gdbarch, regno),
- nr_bytes, regsize);
+ gdb_printf (gdb_stderr,
+ "Size of register %s (%d/%d) "
+ "incorrect (%d instead of %d))",
+ gdbarch_register_name (gdbarch, regno),
+ regno,
+ gdbarch_register_sim_regno (gdbarch, regno),
+ nr_bytes, regsize);
warn_user = 0;
}
/* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
regcache->raw_supply (regno, buf.data ());
if (remote_debug)
{
- fprintf_unfiltered (gdb_stdlog,
- "gdbsim_fetch_register: %d", regno);
+ gdb_printf (gdb_stdlog,
+ "gdbsim_fetch_register: %d", regno);
/* FIXME: We could print something more intelligible. */
dump_mem (buf.data (), regsize);
}
if (remote_debug)
{
- fprintf_unfiltered (gdb_stdlog, "gdbsim_store_register: %d", regno);
+ gdb_printf (gdb_stdlog, "gdbsim_store_register: %d", regno);
/* FIXME: We could print something more intelligible. */
dump_mem (tmp.data (), regsize);
}
gdbsim_target::kill ()
{
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_kill\n");
+ gdb_printf (gdb_stdlog, "gdbsim_kill\n");
/* There is no need to `kill' running simulator - the simulator is
not running. Mourning it is enough. */
error (_("GDB sim does not yet support a load offset."));
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_load: prog \"%s\"\n", prog);
+ gdb_printf (gdb_stdlog, "gdbsim_load: prog \"%s\"\n", prog);
/* FIXME: We will print two messages on error.
Need error to either not print anything if passed NULL or need
warning (_("No program loaded."));
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gdbsim_create_inferior: exec_file \"%s\", args \"%s\"\n",
- (exec_file ? exec_file : "(NULL)"),
- args);
+ gdb_printf (gdb_stdlog,
+ "gdbsim_create_inferior: exec_file \"%s\", args \"%s\"\n",
+ (exec_file ? exec_file : "(NULL)"),
+ args);
if (inferior_ptid == sim_data->remote_sim_ptid)
kill ();
sysroot += strlen (TARGET_SYSROOT_PREFIX);
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gdbsim_open: args \"%s\"\n", args ? args : "(null)");
+ gdb_printf (gdb_stdlog,
+ "gdbsim_open: args \"%s\"\n", args ? args : "(null)");
/* Ensure that the sim target is not on the target stack. This is
necessary, because if it is on the target stack, the call to
sim_data->gdbsim_desc = gdbsim_desc;
current_inferior ()->push_target (&gdbsim_ops);
- printf_filtered ("Connected to the simulator.\n");
+ gdb_printf ("Connected to the simulator.\n");
/* There's nothing running after "target sim" or "load"; not until
"run". */
gdbsim_target::close ()
{
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_close\n");
+ gdb_printf (gdb_stdlog, "gdbsim_close\n");
for (inferior *inf : all_inferiors (this))
close_one_inferior (inf);
gdbsim_target::detach (inferior *inf, int from_tty)
{
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_detach\n");
+ gdb_printf (gdb_stdlog, "gdbsim_detach\n");
inf->unpush_target (this); /* calls gdbsim_close to do the real work */
if (from_tty)
- printf_filtered ("Ending simulator %s debugging\n", target_shortname ());
+ gdb_printf ("Ending simulator %s debugging\n", target_shortname ());
}
/* Resume execution of the target process. STEP says whether to single-step
sim_data->resume_step = step;
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog,
- _("gdbsim_resume: pid %d, step %d, signal %d\n"),
- inf->pid, step, siggnal);
+ gdb_printf (gdb_stdlog,
+ _("gdbsim_resume: pid %d, step %d, signal %d\n"),
+ inf->pid, step, siggnal);
}
}
}
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_wait\n");
+ gdb_printf (gdb_stdlog, "gdbsim_wait\n");
#if defined (HAVE_SIGACTION) && defined (SA_RESTART)
{
gdb_assert (sim_data->gdbsim_desc != NULL);
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gdbsim_xfer_memory: readbuf %s, writebuf %s, "
- "memaddr %s, len %s\n",
- host_address_to_string (readbuf),
- host_address_to_string (writebuf),
- paddress (target_gdbarch (), memaddr),
- pulongest (len));
+ gdb_printf (gdb_stdlog,
+ "gdbsim_xfer_memory: readbuf %s, writebuf %s, "
+ "memaddr %s, len %s\n",
+ host_address_to_string (readbuf),
+ host_address_to_string (writebuf),
+ paddress (target_gdbarch (), memaddr),
+ pulongest (len));
if (writebuf)
{
file = bfd_get_filename (current_program_space->exec_bfd ());
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_files_info: file \"%s\"\n", file);
+ gdb_printf (gdb_stdlog, "gdbsim_files_info: file \"%s\"\n", file);
if (current_program_space->exec_bfd ())
{
- printf_filtered ("\tAttached to %s running program %s\n",
- target_shortname (), file);
+ gdb_printf ("\tAttached to %s running program %s\n",
+ target_shortname (), file);
sim_info (sim_data->gdbsim_desc, 0);
}
}
gdbsim_target::mourn_inferior ()
{
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbsim_mourn_inferior:\n");
+ gdb_printf (gdb_stdlog, "gdbsim_mourn_inferior:\n");
remove_breakpoints ();
generic_mourn_inferior ();