/* Remote debugging interface for boot monitors, for GDB.
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
Resurrected from the ashes by Stu Grossman.
/* Tell the remote machine to resume. */
static void
-monitor_resume (ptid_t ptid, int step, enum target_signal sig)
+monitor_resume (struct target_ops *ops,
+ ptid_t ptid, int step, enum target_signal sig)
{
/* Some monitors require a different command when starting a program */
monitor_debug ("MON resume\n");
{
target_terminal_ours ();
- if (query ("Interrupted while waiting for the program.\n\
-Give up (and stop debugging it)? "))
+ if (query (_("Interrupted while waiting for the program.\n\
+Give up (and stop debugging it)? ")))
{
target_mourn_inferior ();
deprecated_throw_reason (RETURN_QUIT);
status just as `wait' would. */
static ptid_t
-monitor_wait (ptid_t ptid, struct target_waitstatus *status)
+monitor_wait (struct target_ops *ops,
+ ptid_t ptid, struct target_waitstatus *status, int options)
{
int old_timeout = timeout;
char buf[TARGET_BUF_SIZE];
}
static void
-monitor_fetch_registers (struct regcache *regcache, int regno)
+monitor_fetch_registers (struct target_ops *ops,
+ struct regcache *regcache, int regno)
{
monitor_debug ("MON fetchregs\n");
if (current_monitor->getreg.cmd)
/* Store the remote registers. */
static void
-monitor_store_registers (struct regcache *regcache, int regno)
+monitor_store_registers (struct target_ops *ops,
+ struct regcache *regcache, int regno)
{
if (regno >= 0)
{
}
static void
-monitor_kill (void)
+monitor_kill (struct target_ops *ops)
{
return; /* ignore attempts to kill target system */
}
first_time = 1;
clear_proceed_status ();
- write_pc (bfd_get_start_address (exec_bfd));
+ regcache_write_pc (get_current_regcache (),
+ bfd_get_start_address (exec_bfd));
}
/* Clean up when a program exits.
/* Finally, make the PC point at the start address */
if (exec_bfd)
- write_pc (bfd_get_start_address (exec_bfd));
+ regcache_write_pc (get_current_regcache (),
+ bfd_get_start_address (exec_bfd));
/* There used to be code here which would clear inferior_ptid and
call clear_symtab_users. None of that should be necessary:
/* Check to see if a thread is still alive. */
static int
-monitor_thread_alive (ptid_t ptid)
+monitor_thread_alive (struct target_ops *ops, ptid_t ptid)
{
if (ptid_equal (ptid, monitor_ptid))
/* The monitor's task is always alive. */
buffer. */
static char *
-monitor_pid_to_str (ptid_t ptid)
+monitor_pid_to_str (struct target_ops *ops, ptid_t ptid)
{
static char buf[64];