]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2008-06-21 Michael Snyder <msnyder@specifix.com>
authorMichael Snyder <msnyder@vmware.com>
Sun, 22 Jun 2008 02:36:30 +0000 (02:36 +0000)
committerMichael Snyder <msnyder@vmware.com>
Sun, 22 Jun 2008 02:36:30 +0000 (02:36 +0000)
Add support for 'R' packet (restart).
* gdbfreeplay-back.c (handle_special_case).  Add support for 'R'.
Remove support for "monitor gdbfreeplay-echo".

gdb/gdbserver/ChangeLog
gdb/gdbserver/gdbfreeplay-back.c

index a748f2858e07b49af8e597f3707b76c477ffae90..7464deedac5c40037cb5d965fe74c952a0d0afe7 100644 (file)
@@ -1,5 +1,9 @@
 2008-06-21  Michael Snyder  <msnyder@specifix.com>
 
+       Add support for 'R' packet (restart).
+       * gdbfreeplay-back.c (handle_special_case).  Add support for 'R'.
+       Remove support for "monitor gdbfreeplay-echo".
+
        Add support for 'O' packet output.
        * remote-breakpoint.h (PLAY_O_PACKETS): New enum const.
        * gdbfreeplay-back.c (StopFrame): Discard gpos, replace with Opos.
index 0cc65fe4dc26bb5658486280b48e1d6ed36bda70..e44e2a4bab80a0cbe46493be43965360bb851234 100644 (file)
@@ -700,23 +700,16 @@ handle_special_case (FILE *infile, int fd, char *request)
       return OK;
     }
 
-  /* Handle "monitor gdbfreeplay-echo"
-     (just to get a handle on the 'O' message).  */
-  if ((p = strstr (request, monitor_echo)) != NULL)
+  /* Handle 'R' (restart) request.
+     This is an extended-remote request that is not really used any more,
+     but we can send it out-of-band (using "maint packet") to effectively
+     set the replay buffer back to the beginning.  */
+  if (strstr (request, "$R#52") != NULL)
     {
-      /* OK, this will be an ascii-fied string.  */
-      p += strlen (monitor_echo);
-      /* Skip spaces */
-      while (p[0] == '2' && p[1] == '0')
-       p += 2; /* skip a space */
-
-      while (p[0] && p[0] != '#')
-       {
-         c  = hex_to_int (*p++) << 4;
-         c += hex_to_int (*p++);
-         fputc (c, stdout);
-       }
-      fprintf (stdout, "\n");
+      /* Reset replay buffer to beginning.  */
+      /* NOTE: gdb doesn't know about target state changing, so
+        if you use this, you must accompany it with "flushregs".  */
+      cur_frame = 0;
       return OK;
     }