/* Target operations for the remote server for GDB.
- Copyright (C) 2002-2014 Free Software Foundation, Inc.
+ Copyright (C) 2002-2015 Free Software Foundation, Inc.
Contributed by MontaVista Software.
struct target_ops *the_target;
-void
-set_desired_inferior (int use_general)
+int
+set_desired_thread (int use_general)
{
struct thread_info *found;
else
found = find_thread_ptid (cont_thread);
- if (found == NULL)
- current_inferior = get_first_thread ();
- else
- current_inferior = found;
+ current_thread = found;
+ return (current_thread != NULL);
}
int
return ret;
}
+/* See target/target.h. */
+
+void
+target_stop_and_wait (ptid_t ptid)
+{
+ struct target_waitstatus status;
+ int was_non_stop = non_stop;
+ struct thread_resume resume_info;
+
+ resume_info.thread = ptid;
+ resume_info.kind = resume_stop;
+ resume_info.sig = GDB_SIGNAL_0;
+ (*the_target->resume) (&resume_info, 1);
+
+ non_stop = 1;
+ mywait (ptid, &status, 0, 0);
+ non_stop = was_non_stop;
+}
+
+/* See target/target.h. */
+
+void
+target_continue_no_signal (ptid_t ptid)
+{
+ struct thread_resume resume_info;
+
+ resume_info.thread = ptid;
+ resume_info.kind = resume_continue;
+ resume_info.sig = GDB_SIGNAL_0;
+ (*the_target->resume) (&resume_info, 1);
+}
+
int
start_non_stop (int nonstop)
{
void
set_target_ops (struct target_ops *target)
{
- the_target = (struct target_ops *) xmalloc (sizeof (*the_target));
+ the_target = XNEW (struct target_ops);
memcpy (the_target, target, sizeof (*the_target));
}
return (*the_target->kill) (pid);
}
+
+/* Target can do hardware single step. */
+
+int
+target_can_do_hardware_single_step (void)
+{
+ return 1;
+}