{
if (sr_get_debug ())
printf_filtered ("gdbsim_open: args \"%s\"\n", args ? args : "(null)");
+
+ sim_set_callbacks (&default_callback);
+ default_callback.init (&default_callback);
+
sim_open (args);
+
push_target (&gdbsim_ops);
target_fetch_registers (-1);
printf_filtered ("Connected to the simulator.\n");
int pid, step;
enum target_signal siggnal;
{
+ if (inferior_pid != 42)
+ error ("The program is not being run.");
+
if (sr_get_debug ())
printf_filtered ("gdbsim_resume: step %d, signal %d\n", step, siggnal);
add_com ("sim <command>", class_obscure, simulator_command,
"Send a command to the simulator.");
-
- sim_set_callbacks (&default_callback);
- default_callback.init (&default_callback);
}