Update mn10300 dwarf register map
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index c0596b398b0598dc6ea4542a8bf9f6f8472a7e4f..93090875880a497a35be3edd8a09c4c55636d6be 100644 (file)
@@ -1,6 +1,6 @@
 /* Generic remote debugging interface for simulators.
 
-   Copyright (C) 1993-2013 Free Software Foundation, Inc.
+   Copyright (C) 1993-2014 Free Software Foundation, Inc.
 
    Contributed by Cygnus Support.
    Steve Chamberlain (sac@cygnus.com).
@@ -81,7 +81,8 @@ static void gdbsim_close (void);
 static void gdbsim_detach (struct target_ops *ops, const char *args,
                           int from_tty);
 
-static void gdbsim_prepare_to_store (struct regcache *regcache);
+static void gdbsim_prepare_to_store (struct target_ops *self,
+                                    struct regcache *regcache);
 
 static void gdbsim_files_info (struct target_ops *target);
 
@@ -206,7 +207,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
 
   if (sim_data == NULL)
     {
-      sim_data = XZALLOC(struct sim_inferior_data);
+      sim_data = XCNEW(struct sim_inferior_data);
       set_inferior_data (inf, sim_inferior_data_key, sim_data);
 
       /* Allocate a ptid for this inferior.  */
@@ -1052,7 +1053,7 @@ gdbsim_wait (struct target_ops *ops,
    debugged.  */
 
 static void
-gdbsim_prepare_to_store (struct regcache *regcache)
+gdbsim_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs.  */
 }
@@ -1063,10 +1064,11 @@ gdbsim_prepare_to_store (struct regcache *regcache)
 static LONGEST
 gdbsim_xfer_memory (struct target_ops *target,
                    gdb_byte *readbuf, const gdb_byte *writebuf,
-                   ULONGEST memaddr, LONGEST len)
+                   ULONGEST memaddr, ULONGEST len)
 {
   struct sim_inferior_data *sim_data
     = get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED);
+  int l;
 
   /* If this target doesn't have memory yet, return 0 causing the
      request to be passed to a lower target, hopefully an exec
@@ -1092,21 +1094,21 @@ gdbsim_xfer_memory (struct target_ops *target,
                        host_address_to_string (readbuf),
                        host_address_to_string (writebuf),
                        paddress (target_gdbarch (), memaddr),
-                       plongest (len));
+                       pulongest (len));
 
   if (writebuf)
     {
       if (remote_debug && len > 0)
        dump_mem (writebuf, len);
-      len = sim_write (sim_data->gdbsim_desc, memaddr, writebuf, len);
+      l = sim_write (sim_data->gdbsim_desc, memaddr, writebuf, len);
     }
   else
     {
-      len = sim_read (sim_data->gdbsim_desc, memaddr, readbuf, len);
+      l = sim_read (sim_data->gdbsim_desc, memaddr, readbuf, len);
       if (remote_debug && len > 0)
        dump_mem (readbuf, len);
     }
-  return len;
+  return l;
 }
 
 /* Target to_xfer_partial implementation.  */
@@ -1114,7 +1116,7 @@ gdbsim_xfer_memory (struct target_ops *target,
 static LONGEST
 gdbsim_xfer_partial (struct target_ops *ops, enum target_object object,
                     const char *annex, gdb_byte *readbuf,
-                    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
+                    const gdb_byte *writebuf, ULONGEST offset, ULONGEST len)
 {
   switch (object)
     {
This page took 0.027982 seconds and 4 git commands to generate.