aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>1995-10-07 00:31:18 +0000
committerJim Wilson <wilson@tuliptree.org>1995-10-07 00:31:18 +0000
commit7a29d6863d7219ebb2bf29a6d326271ed12aa5c8 (patch)
tree8a156f68863d4a28b93372ec5403dd8ca798a138 /gdb/remote-sim.c
parentb57765227999eed27af415416375051e1ba6a786 (diff)
downloadgdb-7a29d6863d7219ebb2bf29a6d326271ed12aa5c8.zip
gdb-7a29d6863d7219ebb2bf29a6d326271ed12aa5c8.tar.gz
gdb-7a29d6863d7219ebb2bf29a6d326271ed12aa5c8.tar.bz2
Modify last patch based on advice from Stu.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 27b17ad..c7208b0 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -218,6 +218,10 @@ gdbsim_open (args, from_tty)
if (sr_get_debug ())
printf_filtered ("gdbsim_open: args \"%s\"\n", args ? args : "(null)");
sim_open (args);
+
+ sim_set_callbacks (&default_callback);
+ default_callback.init (&default_callback);
+
push_target (&gdbsim_ops);
target_fetch_registers (-1);
printf_filtered ("Connected to the simulator.\n");
@@ -460,7 +464,4 @@ _initialize_remote_sim ()
add_com ("sim <command>", class_obscure, simulator_command,
"Send a command to the simulator.");
-
- sim_set_callbacks (&default_callback);
- default_callback.init (&default_callback);
}