summaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 4f50856b9c9..493b63122b5 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3210,7 +3210,7 @@ remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
set_continue_thread (ptid);
buf = rs->buf;
- if (target_get_execution_direction () == EXEC_REVERSE)
+ if (execution_direction == EXEC_REVERSE)
{
/* We don't pass signals to the target in reverse exec mode. */
if (info_verbose && siggnal != TARGET_SIGNAL_0)
@@ -7131,34 +7131,12 @@ remote_command (char *args, int from_tty)
help_list (remote_cmdlist, "remote ", -1, gdb_stdout);
}
-/* Reverse execution.
- FIXME: set up as a capability. */
-static enum exec_direction_kind remote_exec_direction = EXEC_FORWARD;
+static int remote_target_can_reverse = 1;
-static enum exec_direction_kind
-remote_get_exec_direction (void)
-{
- if (remote_debug && info_verbose)
- printf_filtered ("remote exec_direction is %s\n",
- remote_exec_direction == EXEC_FORWARD ? _("forward") :
- remote_exec_direction == EXEC_REVERSE ? _("reverse") :
- _("unknown"));
- return remote_exec_direction;
-}
-
-static int remote_set_exec_direction (enum exec_direction_kind dir)
+static int
+remote_can_execute_reverse (void)
{
- if (remote_debug && info_verbose)
- printf_filtered ("Set remote exec_direction: %s\n",
- dir == EXEC_FORWARD ? _("forward") :
- dir == EXEC_REVERSE ? _("reverse") :
- _("bad direction"));
-
- /* FIXME: check target for capability. */
- if (dir == EXEC_FORWARD || dir == EXEC_REVERSE)
- return (remote_exec_direction = dir);
- else
- return EXEC_ERROR;
+ return remote_target_can_reverse;
}
static void
@@ -7209,8 +7187,7 @@ Specify the serial device it is connected to\n\
remote_ops.to_has_registers = 1;
remote_ops.to_has_execution = 1;
remote_ops.to_has_thread_control = tc_schedlock; /* can lock scheduler */
- remote_ops.to_get_exec_direction = remote_get_exec_direction;
- remote_ops.to_set_exec_direction = remote_set_exec_direction;
+ remote_ops.to_can_execute_reverse = remote_can_execute_reverse;
remote_ops.to_magic = OPS_MAGIC;
remote_ops.to_memory_map = remote_memory_map;
remote_ops.to_flash_erase = remote_flash_erase;