* mips-tdep.c (mips_type_needs_double_align): New function.
[deliverable/binutils-gdb.git] / gdb / remote-rdp.c
index ccce506537eb203a653a9ae5d1e4d1662c4dcb28..f0fe2a975822e55c4bc83dcb41fa7380cf8f1f00 100644 (file)
@@ -1,5 +1,6 @@
 /* Remote debugging for the ARM RDP interface.
-   Copyright 1994, 1995, 2001 Free Software Foundation, Inc.
+   Copyright 1994, 1995, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,7 +39,6 @@
 
 #include "defs.h"
 #include "inferior.h"
-#include "gdb_wait.h"
 #include "value.h"
 #include "callback.h"
 #include "command.h"
 #include "remote-utils.h"
 #include "gdb_string.h"
 #include "gdbcore.h"
+#include "regcache.h"
 
 #ifdef HAVE_TIME_H
 #include <time.h>
 #endif
 
 extern struct target_ops remote_rdp_ops;
-static serial_t io;
+static struct serial *io;
 static host_callback *callback = &default_callback;
 
 struct
@@ -472,13 +473,13 @@ send_rdp (char *template,...)
          *pi = get_byte ();
          break;
        default:
-         abort ();
+         internal_error (__FILE__, __LINE__, "failed internal consistency check");
        }
     }
   va_end (alist);
 
   if (dst != buf)
-    abort ();
+    internal_error (__FILE__, __LINE__, "failed internal consistency check");
 }
 
 
@@ -698,13 +699,7 @@ rdp_set_command_line (char *command, char *args)
   if (commandline != NULL)
     xfree (commandline);
 
-  commandline = malloc (strlen (command) + strlen (args) + 2);
-  if (commandline != NULL)
-    {
-      strcpy (commandline, command);
-      strcat (commandline, " ");
-      strcat (commandline, args);
-    }
+  xasprintf (&commandline, "%s %s", command, args);
 }
 
 static void
@@ -1188,7 +1183,7 @@ remote_rdp_close (int quitting)
    to the target, or zero for no signal.  */
 
 static void
-remote_rdp_resume (int pid, int step, enum target_signal siggnal)
+remote_rdp_resume (ptid_t ptid, int step, enum target_signal siggnal)
 {
   if (step)
     rdp_step ();
@@ -1200,8 +1195,8 @@ remote_rdp_resume (int pid, int step, enum target_signal siggnal)
    or -1 in case of error; store status through argument pointer STATUS,
    just as `wait' would.  */
 
-static int
-remote_rdp_wait (int pid, struct target_waitstatus *status)
+static ptid_t
+remote_rdp_wait (ptid_t ptid, struct target_waitstatus *status)
 {
   switch (ds.rdi_stopped_status)
     {
@@ -1227,7 +1222,7 @@ remote_rdp_wait (int pid, struct target_waitstatus *status)
 #endif
     }
 
-  return inferior_pid;
+  return inferior_ptid;
 }
 
 /* Get ready to modify the registers array.  On machines which store
@@ -1353,7 +1348,7 @@ remote_rdp_create_inferior (char *exec_file, char *allargs, char **env)
   /* This gives us a chance to set up the command line */
   rdp_set_command_line (exec_file, allargs);
 
-  inferior_pid = 42;
+  inferior_ptid = pid_to_ptid (42);
   insert_breakpoints ();       /* Needed to get correct instruction in cache */
 
   /*
@@ -1438,7 +1433,6 @@ init_remote_rdp_ops (void)
   remote_rdp_ops.to_thread_alive = 0;
   remote_rdp_ops.to_stop = 0;
   remote_rdp_ops.to_pid_to_exec_file = NULL;
-  remote_rdp_ops.to_core_file_to_sym_file = NULL;
   remote_rdp_ops.to_stratum = process_stratum;
   remote_rdp_ops.DONT_USE = NULL;
   remote_rdp_ops.to_has_all_memory = 1;
This page took 0.024762 seconds and 4 git commands to generate.