+2016-04-13 Pedro Alves <palves@redhat.com>
+
+ PR remote/19840
+ * remote.c (struct remote_state) <last_resume_exec_dir>: New
+ field.
+ (new_remote_state): Default last_resume_exec_dir to EXEC_FORWARD.
+ (remote_open_1): Reset last_resume_exec_dir to EXEC_FORWARD.
+ (remote_resume): Store the last execution direction.
+ (remote_execution_direction): New function.
+ (init_remote_ops): Install it as to_execution_direction target_ops
+ method.
+
2016-04-12 Pedro Alves <palves@redhat.com>
* common/common-exceptions.h (GDB_XCPT_TRY): Update comment.
int last_sent_step;
+ /* The execution direction of the last resume we got. */
+ enum exec_direction_kind last_resume_exec_dir;
+
char *finished_object;
char *finished_annex;
ULONGEST finished_offset;
result->buf = (char *) xmalloc (result->buf_size);
result->remote_traceframe_number = -1;
result->last_sent_signal = GDB_SIGNAL_0;
+ result->last_resume_exec_dir = EXEC_FORWARD;
result->fs_pid = -1;
return result;
rs->continue_thread = not_sent_ptid;
rs->remote_traceframe_number = -1;
+ rs->last_resume_exec_dir = EXEC_FORWARD;
+
/* Probe for ability to use "ThreadInfo" query, as required. */
rs->use_threadinfo_query = 1;
rs->use_threadextra_query = 1;
rs->last_sent_signal = siggnal;
rs->last_sent_step = step;
+ rs->last_resume_exec_dir = execution_direction;
+
/* The vCont packet doesn't need to specify threads via Hc. */
/* No reverse support (yet) for vCont. */
if (execution_direction != EXEC_REVERSE)
return 0;
}
+/* Implementation of the to_execution_direction method for the remote
+ target. */
+
+static enum exec_direction_kind
+remote_execution_direction (struct target_ops *self)
+{
+ struct remote_state *rs = get_remote_state ();
+
+ return rs->last_resume_exec_dir;
+}
+
static void
init_remote_ops (void)
{
remote_ops.to_remove_vfork_catchpoint = remote_remove_vfork_catchpoint;
remote_ops.to_insert_exec_catchpoint = remote_insert_exec_catchpoint;
remote_ops.to_remove_exec_catchpoint = remote_remove_exec_catchpoint;
+ remote_ops.to_execution_direction = remote_execution_direction;
}
/* Set up the extended remote vector by making a copy of the standard