#include "gdbcore.h"
#include "remote-sim.h"
#include "remote-utils.h"
+#include "callback.h"
/* Naming convention:
sim_* are the interface to the simulator (see remote-sim.h).
-
+ sim_callback_* are the stuff which the simulator can see inside GDB.
gdbsim_* are stuff which is internal to gdb. */
/* Forward data declarations */
}
}
+
static void
gdbsim_store_register (regno)
int regno;
program_loaded = 1;
if (sim_load (prog, fromtty) != 0)
- gr_load_image (prog, fromtty);
+ generic_load (prog, fromtty);
}
inferior_pid = 42;
insert_breakpoints (); /* Needed to get correct instruction in cache */
-
- /* FIXME: This needs to be done in a target-specific fashion.
- What you see here works for the PPC simulator tiemann 9/9/1995.
- Also, the fact that we can find the addresses for breakpoints without
- this mechanism suggests some redundant code that could be merged. */
- add_text_to_loadinfo (entry_pt, entry_pt+exec_bfd->sections->_cooked_size);
proceed (entry_pt, TARGET_SIGNAL_DEFAULT, 0);
}
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");
}