/* Generic remote debugging interface for simulators.
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Steve Chamberlain (sac@cygnus.com).
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
#include "defs.h"
#include "inferior.h"
static void gdbsim_prepare_to_store (void);
-static int gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr,
- int len, int write,
- struct mem_attrib *attrib,
- struct target_ops *target);
-
static void gdbsim_files_info (struct target_ops *target);
static void gdbsim_mourn_inferior (void);
#else
prev_sigint = signal (SIGINT, gdbsim_cntrl_c);
#endif
- sim_resume (gdbsim_desc, resume_step,
- target_signal_to_host (resume_siggnal));
+ sim_resume (gdbsim_desc, resume_step, resume_siggnal);
signal (SIGINT, prev_sigint);
resume_step = 0;
case sim_stopped:
switch (sigrc)
{
- case SIGABRT:
+ case TARGET_SIGNAL_ABRT:
quit ();
break;
- case SIGINT:
- case SIGTRAP:
+ case TARGET_SIGNAL_INT:
+ case TARGET_SIGNAL_TRAP:
default:
status->kind = TARGET_WAITKIND_STOPPED;
- /* The signal in sigrc is a host signal. That probably
- should be fixed. */
- status->value.sig = target_signal_from_host (sigrc);
+ status->value.sig = sigrc;
break;
}
break;
case sim_signalled:
status->kind = TARGET_WAITKIND_SIGNALLED;
- /* The signal in sigrc is a host signal. That probably
- should be fixed. */
- status->value.sig = target_signal_from_host (sigrc);
+ status->value.sig = sigrc;
break;
case sim_running:
case sim_polling:
Returns the number of bytes transferred. */
static int
-gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
+gdbsim_xfer_inferior_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
int write, struct mem_attrib *attrib,
struct target_ops *target)
{
}
static int
-gdbsim_insert_breakpoint (CORE_ADDR addr, char *contents_cache)
+gdbsim_insert_breakpoint (CORE_ADDR addr, bfd_byte *contents_cache)
{
return memory_insert_breakpoint (addr, contents_cache);
}
static int
-gdbsim_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
+gdbsim_remove_breakpoint (CORE_ADDR addr, bfd_byte *contents_cache)
{
return memory_remove_breakpoint (addr, contents_cache);
}
init_gdbsim_ops ();
add_target (&gdbsim_ops);
- add_com ("sim <command>", class_obscure, simulator_command,
- "Send a command to the simulator.");
+ add_com ("sim", class_obscure, simulator_command,
+ _("Send a command to the simulator."));
}