Thu Mar 26 12:00:35 1998 Martin M. Hunt <hunt@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / remote-mips.c
index 3003add0837ebc3445c90a256097725fd34306c3..bdd50c56c29f1ad4b577f7812db0ae716a9a5897 100644 (file)
@@ -1260,7 +1260,7 @@ mips_request (cmd, addr, data, perr, timeout, buff)
   int rpid;
   char rcmd;
   int rerrflg;
-  int rresponse;
+  unsigned long rresponse;
 
   if (buff == (char *) NULL)
     buff = myBuff;
@@ -1285,7 +1285,7 @@ mips_request (cmd, addr, data, perr, timeout, buff)
   len = mips_receive_packet (buff, 1, timeout);
   buff[len] = '\0';
 
-  if (sscanf (buff, "0x%x %c 0x%x 0x%x",
+  if (sscanf (buff, "0x%x %c 0x%x 0x%lx",
              &rpid, &rcmd, &rerrflg, &rresponse) != 4
       || (cmd != '\0' && rcmd != cmd))
     mips_error ("Bad response from remote board");
@@ -1346,6 +1346,7 @@ mips_enter_debug ()
   else /* assume IDT monitor by default */
     mips_send_command ("db tty0\r", 0);
 
+  sleep(1);
   SERIAL_WRITE (mips_desc, "\r", sizeof "\r" - 1);
 
   /* We don't need to absorb any spurious characters here, since the
@@ -1385,18 +1386,6 @@ mips_exit_debug ()
     mips_request ('x', (unsigned int) 0, (unsigned int) 0, &err,
                   mips_receive_wait, NULL);
 
-  if (mips_monitor == MON_IDT && !mips_expect ("Exiting remote debug"))
-    return -1;
-    
-  if (mips_monitor == MON_DDB)
-    {
-      if (!mips_expect ("\n"))
-        return -1;
-    }
-  else
-    if (!mips_expect ("\r\n"))
-      return -1;
-
   if (!mips_expect (mips_monitor_prompt))
     return -1;
 
@@ -1754,15 +1743,6 @@ mips_resume (pid, step, siggnal)
 {
   int err;
 
-/* start-sanitize-gm */
-#ifndef GENERAL_MAGIC
-  if (siggnal != TARGET_SIGNAL_0)
-    warning
-      ("Can't send signals to a remote system.  Try `handle %s ignore'.",
-       target_signal_to_name (siggnal));
-#endif /* GENERAL_MAGIC */
-/* end-sanitize-gm */
-
   /* LSI PMON requires returns a reply packet "0x1 s 0x0 0x57f" after
      a single step, so we wait for that.  */
   mips_request (step ? 's' : 'c',
@@ -2302,16 +2282,7 @@ Can't pass arguments to remote MIPS board; arguments ignored.");
 
   /* FIXME: Should we set inferior_pid here?  */
 
-/* start-sanitize-gm */
-#ifdef GENERAL_MAGIC
-  magic_create_inferior_hook ();
-  proceed (entry_pt, TARGET_SIGNAL_PWR, 0);
-#else
-/* end-sanitize-gm */
   proceed (entry_pt, TARGET_SIGNAL_DEFAULT, 0);
-/* start-sanitize-gm */
-#endif /* GENERAL_MAGIC */
-/* end-sanitize-gm */
 }
 
 /* Clean up after a process.  Actually nothing to do.  */
@@ -3582,8 +3553,8 @@ Debug a board using the PMON MIPS remote debugging protocol over a serial\n\
 line. The first argument is the device it is connected to or, if it contains\n\
 a colon, HOST:PORT to access a board over a network.  The optional second\n\
 parameter is the temporary file in the form HOST:FILENAME to be used for\n\
-TFTP downloads to the board.  The optional third parameter is the local\n\
-of the TFTP temporary file, if it differs from the filename seen by the board";
+TFTP downloads to the board.  The optional third parameter is the local name\n\
+of the TFTP temporary file, if it differs from the filename seen by the board.";
   ddb_ops.to_open = ddb_open;
   ddb_ops.to_wait = mips_wait;
 
This page took 0.024901 seconds and 4 git commands to generate.