2011-05-26 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Thu, 26 May 2011 18:23:32 +0000 (18:23 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 26 May 2011 18:23:32 +0000 (18:23 +0000)
gdb/
* inferior.h (enum exec_direction_kind): Delete EXEC_ERROR.
* infrun.c (show_exec_direction_func): Don't handle EXEC_ERROR.
Internal error on invalid values.
* reverse.c: Don't handle EXEC_ERROR.
* mi/mi-main.c: Don't handle EXEC_ERROR.

gdb/ChangeLog
gdb/inferior.h
gdb/infrun.c
gdb/mi/mi-main.c
gdb/reverse.c

index 31b34e5..e111328 100644 (file)
@@ -1,5 +1,13 @@
 2011-05-26  Pedro Alves  <pedro@codesourcery.com>
 
+       * inferior.h (enum exec_direction_kind): Delete EXEC_ERROR.
+       * infrun.c (show_exec_direction_func): Don't handle EXEC_ERROR.
+       Internal error on invalid values.
+       * reverse.c: Don't handle EXEC_ERROR.
+       * mi/mi-main.c: Don't handle EXEC_ERROR.
+
+2011-05-26  Pedro Alves  <pedro@codesourcery.com>
+
        * record.c: Include event-loop.h, inf-loop.h.
        (record_beneath_to_async): New global.
        (tmp_to_async): New global.
index 9949136..9982a7a 100644 (file)
@@ -352,8 +352,7 @@ enum stop_kind
 enum exec_direction_kind
   {
     EXEC_FORWARD,
-    EXEC_REVERSE,
-    EXEC_ERROR
+    EXEC_REVERSE
   };
 
 /* The current execution direction.  This should only be set to enum
index 8502e69..46b2fe1 100644 (file)
@@ -6920,12 +6920,10 @@ show_exec_direction_func (struct ui_file *out, int from_tty,
   case EXEC_REVERSE:
     fprintf_filtered (out, _("Reverse.\n"));
     break;
-  case EXEC_ERROR:
   default:
-    fprintf_filtered (out, _("Forward (target `%s' does not "
-                            "support exec-direction).\n"),
-                     target_shortname);
-    break;
+    internal_error (__FILE__, __LINE__,
+                   _("bogus execution_direction value: %d"),
+                   (int) execution_direction);
   }
 }
 
index 4d1e3f9..ca62a30 100644 (file)
@@ -285,9 +285,6 @@ exec_reverse_continue (char **argv, int argc)
   enum exec_direction_kind dir = execution_direction;
   struct cleanup *old_chain;
 
-  if (dir == EXEC_ERROR)
-    error (_("Target %s does not support this command."), target_shortname);
-
   if (dir == EXEC_REVERSE)
     error (_("Already in reverse mode."));
 
index 61f2e7c..b44c0d1 100644 (file)
@@ -50,9 +50,6 @@ exec_reverse_once (char *cmd, char *args, int from_tty)
   enum exec_direction_kind dir = execution_direction;
   struct cleanup *old_chain;
 
-  if (dir == EXEC_ERROR)
-    error (_("Target %s does not support this command."), target_shortname);
-
   if (dir == EXEC_REVERSE)
     error (_("Already in reverse mode.  Use '%s' or 'set exec-dir forward'."),
           cmd);