aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-20 00:05:27 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-20 00:05:27 +0000
commit24aa2b57afc51bb0d47d8a3cfa470ad40a36cc6b (patch)
tree85c51478ecca1050b7fe9f99011a5ede31cdc5ba /gdb/remote-sim.c
parent8c5b6ead7d2880ce708ee185ce3506cda1aeff4d (diff)
downloadgdb-24aa2b57afc51bb0d47d8a3cfa470ad40a36cc6b.zip
gdb-24aa2b57afc51bb0d47d8a3cfa470ad40a36cc6b.tar.gz
gdb-24aa2b57afc51bb0d47d8a3cfa470ad40a36cc6b.tar.bz2
Depreciate sim_set_callbacks() function. Set simulator callbacks
during sim_open().
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 8a7d1df..df595ef 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -161,8 +161,6 @@ init_callbacks ()
gdb_callback.error = gdb_os_error;
gdb_callback.poll_quit = gdb_os_poll_quit;
gdb_callback.magic = HOST_CALLBACK_MAGIC;
- sim_set_callbacks (gdbsim_desc, &gdb_callback);
-
callbacks_initialized = 1;
}
}
@@ -497,8 +495,6 @@ gdbsim_open (args, from_tty)
if (gdbsim_desc != NULL)
unpush_target (&gdbsim_ops);
- init_callbacks ();
-
len = 7 + 1 + (args ? strlen (args) : 0) + 50;
arg_buf = (char *) alloca (len);
sprintf (arg_buf, "gdbsim%s%s",
@@ -514,7 +510,9 @@ gdbsim_open (args, from_tty)
error ("Insufficient memory available to allocate simulator arg list.");
make_cleanup (freeargv, (char *) argv);
- gdbsim_desc = sim_open (SIM_OPEN_DEBUG, argv);
+ init_callbacks ();
+ gdbsim_desc = sim_open (SIM_OPEN_DEBUG, &gdb_callback, argv);
+
if (gdbsim_desc == 0)
error ("unable to create simulator instance");