static void gdbsim_mourn_inferior (struct target_ops *target);
-static void gdbsim_stop (struct target_ops *self, ptid_t ptid);
+static void gdbsim_interrupt (struct target_ops *self, ptid_t ptid);
void simulator_command (char *args, int from_tty);
error (_("The program is not being run."));
}
-/* Notify the simulator of an asynchronous request to stop.
+/* Notify the simulator of an asynchronous request to interrupt.
- The simulator shall ensure that the stop request is eventually
+ The simulator shall ensure that the interrupt request is eventually
delivered to the simulator. If the call is made while the
- simulator is not running then the stop request is processed when
+ simulator is not running then the interrupt request is processed when
the simulator is next resumed.
For simulators that do not support this operation, just abort. */
static int
-gdbsim_stop_inferior (struct inferior *inf, void *arg)
+gdbsim_interrupt_inferior (struct inferior *inf, void *arg)
{
struct sim_inferior_data *sim_data
= get_sim_inferior_data (inf, SIM_INSTANCE_NEEDED);
}
static void
-gdbsim_stop (struct target_ops *self, ptid_t ptid)
+gdbsim_interrupt (struct target_ops *self, ptid_t ptid)
{
struct sim_inferior_data *sim_data;
if (ptid_equal (ptid, minus_one_ptid))
{
- iterate_over_inferiors (gdbsim_stop_inferior, NULL);
+ iterate_over_inferiors (gdbsim_interrupt_inferior, NULL);
}
else
{
error (_("Can't stop pid %d. No inferior found."),
ptid_get_pid (ptid));
- gdbsim_stop_inferior (inf, NULL);
+ gdbsim_interrupt_inferior (inf, NULL);
}
}
static void
gdbsim_cntrl_c (int signo)
{
- gdbsim_stop (NULL, minus_one_ptid);
+ gdbsim_interrupt (NULL, minus_one_ptid);
}
static ptid_t
ptid_t ptid, struct target_waitstatus *status, int options)
{
struct sim_inferior_data *sim_data;
- static RETSIGTYPE (*prev_sigint) ();
+ static sighandler_t prev_sigint;
int sigrc = 0;
enum sim_stop reason = sim_running;
gdbsim_ops.to_load = gdbsim_load;
gdbsim_ops.to_create_inferior = gdbsim_create_inferior;
gdbsim_ops.to_mourn_inferior = gdbsim_mourn_inferior;
- gdbsim_ops.to_stop = gdbsim_stop;
+ gdbsim_ops.to_interrupt = gdbsim_interrupt;
gdbsim_ops.to_thread_alive = gdbsim_thread_alive;
gdbsim_ops.to_pid_to_str = gdbsim_pid_to_str;
gdbsim_ops.to_stratum = process_stratum;