Removed v850eq sanitization.
[deliverable/binutils-gdb.git] / gdb / remote-hms.c
index 216e35eb7f7429c4b1b1a37da9b55f6532c7f1b6..6051c4ff3a3b496fd265c8ea2d3e6b6d52329af1 100644 (file)
@@ -17,7 +17,7 @@
 
    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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "gdbcore.h"
@@ -113,7 +113,7 @@ static struct monitor_ops hms_cmds =
     "\003",                    /* getmem.term_cmd */
   },
   {
-    "\003r %s=%x\r",           /* setreg.cmd (name, value) */
+    "r %s=%x\r",               /* setreg.cmd (name, value) */
     NULL,                      /* setreg.resp_delim */
     NULL,                      /* setreg.term */
     NULL                       /* setreg.term_cmd */
@@ -121,7 +121,7 @@ static struct monitor_ops hms_cmds =
   {
     "r %s\r",                  /* getreg.cmd (name) */
     " (",                      /* getreg.resp_delim */
-    "):",                      /* getreg.term */
+    ":",                       /* getreg.term */
     "\003",                    /* getreg.term_cmd */
   },
   "r\r",                       /* dump_registers */
@@ -131,7 +131,7 @@ static struct monitor_ops hms_cmds =
   "tl\r",                      /* download command */
   NULL,                                /* load response */
   ">",                         /* monitor command prompt */
-  NULL,                                /* end-of-command delimitor */
+  "\r",                                /* end-of-command delimitor */
   NULL,                                /* optional command terminator */
   &hms_ops,                    /* target operations */
   SERIAL_1_STOPBITS,           /* number of stop bits */
@@ -139,7 +139,7 @@ static struct monitor_ops hms_cmds =
   MONITOR_OPS_MAGIC            /* magic */
 };
 
-void
+static void
 hms_open (args, from_tty)
      char *args;
      int from_tty;
@@ -147,8 +147,8 @@ hms_open (args, from_tty)
   monitor_open (args, &hms_cmds, from_tty);
 }
 
-
 int write_dos_tick_delay;
+
 void
 _initialize_remote_hms ()
 {
@@ -165,7 +165,6 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
 }
 
 
-
 #if 0
 /* This is kept here because we used to support the H8/500 in this module,
    and I haven't done the H8/500 yet */
@@ -173,7 +172,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
 #include "inferior.h"
 #include "wait.h"
 #include "value.h"
-#include <string.h>
+#include "gdb_string.h"
 #include <ctype.h>
 #include <fcntl.h>
 #include <signal.h>
@@ -203,9 +202,6 @@ static void remove_commands ();
 
 static int quiet = 1;          /* FIXME - can be removed after Dec '94 */
 
-DCACHE *dcache_ptr;
-int remote_dcache;
-serial_t desc;
 
 
 /***********************************************************************
@@ -533,7 +529,6 @@ hms_close (quitting)
       SERIAL_CLOSE (desc);
     }
   is_open = 0;
-  remote_dcache = 0;
 }
 
 /* Terminate the open connection to the remote debugger.  Use this
@@ -562,8 +557,6 @@ hms_resume (pid, step, sig)
      enum target_signal
        sig;
 {
-  dcache_flush (dcache_ptr);
-
   if (step)
     {
       hms_write_cr ("s");
@@ -931,7 +924,7 @@ hms_fetch_register (dummy)
   int s;
   int gottok;
 
-  unsigned LONGEST reg[NUM_REGS];
+  ULONGEST reg[NUM_REGS];
 
   check_open ();
 
@@ -1035,26 +1028,6 @@ translate_addr (addr)
 
 }
 
-/* Read a word from remote address ADDR and return it.
- * This goes through the data cache.
- */
-int
-hms_fetch_word (addr)
-     CORE_ADDR addr;
-{
-  return dcache_fetch (dcache_ptr, addr);
-}
-
-/* Write a word WORD into remote address ADDR.
-   This goes through the data cache.  */
-
-void
-hms_store_word (addr, word)
-     CORE_ADDR addr;
-     int word;
-{
-  dcache_poke (dcache_ptr, addr, word);
-}
 
 int
 hms_xfer_inferior_memory (memaddr, myaddr, len, write, target)
@@ -1064,73 +1037,6 @@ hms_xfer_inferior_memory (memaddr, myaddr, len, write, target)
      int write;
      struct target_ops *target;        /* ignored */
 {
-  register int i;
-
-  /* Round starting address down to longword boundary.  */
-  register CORE_ADDR addr;
-
-  /* Round ending address up; get number of longwords that makes.  */
-  register int count;
-
-  /* Allocate buffer of that many longwords.  */
-  register int *buffer;
-
-  memaddr &= 0xffff;
-  addr = memaddr & -sizeof (int);
-  count = (((memaddr + len) - addr) + sizeof (int) - 1) / sizeof (int);
-
-  buffer = (int *) alloca (count * sizeof (int));
-
-  if (write)
-    {
-      /* Fill start and end extra bytes of buffer with existing memory data.  */
-
-      if (addr != memaddr || len < (int) sizeof (int))
-       {
-         /* Need part of initial word -- fetch it.  */
-         buffer[0] = hms_fetch_word (addr);
-       }
-
-      if (count > 1)           /* FIXME, avoid if even boundary */
-       {
-         buffer[count - 1]
-           = hms_fetch_word (addr + (count - 1) * sizeof (int));
-       }
-
-      /* Copy data to be written over corresponding part of buffer */
-
-      memcpy ((char *) buffer + (memaddr & (sizeof (int) - 1)), myaddr, len);
-
-      /* Write the entire buffer.  */
-
-      for (i = 0; i < count; i++, addr += sizeof (int))
-       {
-         errno = 0;
-         hms_store_word (addr, buffer[i]);
-         if (errno)
-           {
-             return 0;
-           }
-
-       }
-    }
-  else
-    {
-      /* Read all the longwords */
-      for (i = 0; i < count; i++, addr += sizeof (int))
-       {
-         errno = 0;
-         buffer[i] = hms_fetch_word (addr);
-         if (errno)
-           {
-             return 0;
-           }
-         QUIT;
-       }
-
-      /* Copy appropriate bytes out of the buffer.  */
-      memcpy (myaddr, (char *) buffer + (memaddr & (sizeof (int) - 1)), len);
-    }
 
   return len;
 }
@@ -1436,12 +1342,13 @@ by a serial line.",
   hms_insert_breakpoint, hms_remove_breakpoint,                /* Breakpoints */
   0, 0, 0, 0, 0,               /* Terminal handling */
   hms_kill,                    /* FIXME, kill */
-  gr_load_image,
+  generic_load,
   0,                           /* lookup_symbol */
   hms_create_inferior,         /* create_inferior */
   hms_mourn,                   /* mourn_inferior FIXME */
   0,                           /* can_run */
   0,                           /* notice_signals */
+  0,                           /* to_thread_alive */
   0,                           /* to_stop */
   process_stratum, 0,          /* next */
   1, 1, 1, 1, 1,               /* all mem, mem, stack, regs, exec */
This page took 0.026112 seconds and 4 git commands to generate.