aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>1996-11-08 20:38:07 +0000
committerStan Shebs <shebs@codesourcery.com>1996-11-08 20:38:07 +0000
commit07997f65e58703a8c0a0dc2d99f6f13e3db00f73 (patch)
tree702862578e2bd058ae75956f8bb7b20d92708acb /gdb/remote-sim.c
parent81a6f5b20817317609a20f6c255520a95355846e (diff)
downloadgdb-07997f65e58703a8c0a0dc2d99f6f13e3db00f73.zip
gdb-07997f65e58703a8c0a0dc2d99f6f13e3db00f73.tar.gz
gdb-07997f65e58703a8c0a0dc2d99f6f13e3db00f73.tar.bz2
* remote-sim.c (simulator_command): Set up callbacks before
entering the simulator.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 5c9e712..010d501 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -441,15 +441,19 @@ gdbsim_mourn_inferior ()
generic_mourn_inferior ();
}
-/* Put a command string, in args, out to MONITOR. Output from MONITOR
- is placed on the users terminal until the prompt is seen. FIXME: We
- read the characters ourseleves here cause of a nasty echo. */
+/* Pass the command argument through to the simulator verbatim. The
+ simulator must do any command interpretation work. */
static void
simulator_command (args, from_tty)
char *args;
int from_tty;
{
+ /* The user may give a command before the simulator is opened, so
+ ensure that the callbacks have been set up. */
+ sim_set_callbacks (&default_callback);
+ default_callback.init (&default_callback);
+
sim_do_command (args);
}