/* Remote debugging interface for M32R/SDI.
- Copyright (C) 2003-2015 Free Software Foundation, Inc.
+ Copyright (C) 2003-2016 Free Software Foundation, Inc.
Contributed by Renesas Technology Co.
Written by Kei Sakamoto <sakamoto.kei@renesas.com>.
#include <netinet/in.h>
#endif
#include <sys/types.h>
-#include <sys/time.h>
+#include "gdb_sys_time.h"
#include <time.h>
#include "gdb_bfd.h"
#include "cli/cli-utils.h"
-
+#include "symfile.h"
#include "serial.h"
/* Descriptor for I/O to remote machine. */
{
struct hostent *host_ent;
struct sockaddr_in server_addr;
- char *port_str, hostname[256];
+ char hostname[256];
+ const char *port_str;
int port;
int i, n;
int yes = 1;
m32r_wait (struct target_ops *ops,
ptid_t ptid, struct target_waitstatus *status, int options)
{
- static RETSIGTYPE (*prev_sigint) ();
+ static sighandler_t prev_sigint;
unsigned long bp_addr, pc_addr;
int ib_breakpoints;
long i;
int nostart;
struct timeval start_time, end_time;
unsigned long data_count; /* Number of bytes transferred to memory. */
- static RETSIGTYPE (*prev_sigint) ();
+ static sighandler_t prev_sigint;
/* for direct tcp connections, we can do a fast binary download. */
quiet = 0;
if (*arg != '-')
filename = arg;
- else if (strncmp (arg, "-quiet", strlen (arg)) == 0)
+ else if (startswith ("-quiet", arg))
quiet = 1;
- else if (strncmp (arg, "-nostart", strlen (arg)) == 0)
+ else if (startswith ("-nostart", arg))
nostart = 1;
else
error (_("Unknown option `%s'"), arg);
}
static void
-m32r_stop (struct target_ops *self, ptid_t ptid)
+m32r_interrupt (struct target_ops *self, ptid_t ptid)
{
if (remote_debug)
- fprintf_unfiltered (gdb_stdlog, "m32r_stop()\n");
+ fprintf_unfiltered (gdb_stdlog, "m32r_interrupt()\n");
send_cmd (SDI_STOP_CPU);
static int
m32r_can_use_hw_watchpoint (struct target_ops *self,
- int type, int cnt, int othertype)
+ enum bptype type,
+ int cnt, int othertype)
{
return sdi_desc != NULL && cnt < max_access_breaks;
}
static int
m32r_insert_watchpoint (struct target_ops *self,
- CORE_ADDR addr, int len, int type,
+ CORE_ADDR addr, int len, enum target_hw_bp_type type,
struct expression *cond)
{
int i;
}
static int
-m32r_remove_watchpoint (struct target_ops *self,
- CORE_ADDR addr, int len, int type,
- struct expression *cond)
+m32r_remove_watchpoint (struct target_ops *self, CORE_ADDR addr, int len,
+ enum target_hw_bp_type type, struct expression *cond)
{
int i;
m32r_ops.to_load = m32r_load;
m32r_ops.to_create_inferior = m32r_create_inferior;
m32r_ops.to_mourn_inferior = m32r_mourn_inferior;
- m32r_ops.to_stop = m32r_stop;
+ m32r_ops.to_interrupt = m32r_interrupt;
m32r_ops.to_log_command = serial_log_command;
m32r_ops.to_thread_alive = m32r_thread_alive;
m32r_ops.to_pid_to_str = m32r_pid_to_str;