/* Remote debugging interface for M32R/SDI.
- Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
Contributed by Renesas Technology Co.
Written by Kei Sakamoto <sakamoto.kei@renesas.com>.
static int
send_data (void *buf, int len)
{
- int ret;
-
if (!sdi_desc)
return -1;
static void
m32r_resume (struct target_ops *ops,
- ptid_t ptid, int step, enum target_signal sig)
+ ptid_t ptid, int step, enum gdb_signal sig)
{
unsigned long pc_addr, bp_addr, ab_addr;
int ib_breakpoints;
int ib_breakpoints;
long i;
unsigned char buf[13];
- unsigned long val;
int ret, c;
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_wait()\n");
status->kind = TARGET_WAITKIND_EXITED;
- status->value.sig = TARGET_SIGNAL_0;
+ status->value.sig = GDB_SIGNAL_0;
interrupted = 0;
prev_sigint = signal (SIGINT, gdb_cntrl_c);
if (c == '-') /* error */
{
status->kind = TARGET_WAITKIND_STOPPED;
- status->value.sig = TARGET_SIGNAL_HUP;
+ status->value.sig = GDB_SIGNAL_HUP;
return inferior_ptid;
}
else if (c == '+') /* stopped */
status->kind = TARGET_WAITKIND_STOPPED;
if (interrupted)
- status->value.sig = TARGET_SIGNAL_INT;
+ status->value.sig = GDB_SIGNAL_INT;
else
- status->value.sig = TARGET_SIGNAL_TRAP;
+ status->value.sig = GDB_SIGNAL_TRAP;
interrupted = 0;
signal (SIGINT, prev_sigint);
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_detach(%d)\n", from_tty);
- m32r_resume (ops, inferior_ptid, 0, TARGET_SIGNAL_0);
+ m32r_resume (ops, inferior_ptid, 0, GDB_SIGNAL_0);
/* Calls m32r_close to do the real work. */
pop_target ();
int nostart;
struct timeval start_time, end_time;
unsigned long data_count; /* Number of bytes transferred to memory. */
- int ret;
static RETSIGTYPE (*prev_sigint) ();
/* for direct tcp connections, we can do a fast binary download. */
return 1;
}
+/* Implementation of the to_has_execution method. */
+
+static int
+m32r_has_execution (struct target_ops *target, ptid_t the_ptid)
+{
+ return 1;
+}
+
/* Define the target subroutine names. */
struct target_ops m32r_ops;
m32r_ops.to_has_memory = m32r_return_one;
m32r_ops.to_has_stack = m32r_return_one;
m32r_ops.to_has_registers = m32r_return_one;
- m32r_ops.to_has_execution = m32r_return_one;
+ m32r_ops.to_has_execution = m32r_has_execution;
m32r_ops.to_magic = OPS_MAGIC;
};