You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "inferior.h"
#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);
}
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);