From d8b344530cba74a754ec101ccdd8869b3a48ec90 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 26 May 2011 18:23:32 +0000 Subject: [PATCH] 2011-05-26 Pedro Alves 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 | 8 ++++++++ gdb/inferior.h | 3 +-- gdb/infrun.c | 8 +++----- gdb/mi/mi-main.c | 3 --- gdb/reverse.c | 3 --- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 31b34e5810c..e1113282fbc 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2011-05-26 Pedro Alves + + * 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 * record.c: Include event-loop.h, inf-loop.h. diff --git a/gdb/inferior.h b/gdb/inferior.h index 9949136738e..9982a7a5379 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -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 diff --git a/gdb/infrun.c b/gdb/infrun.c index 8502e69ee58..46b2fe1061c 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -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); } } diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 4d1e3f9b9dc..ca62a307641 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -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.")); diff --git a/gdb/reverse.c b/gdb/reverse.c index 61f2e7c50b8..b44c0d1f022 100644 --- a/gdb/reverse.c +++ b/gdb/reverse.c @@ -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); -- 2.30.2