diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1997-04-02 22:17:42 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1997-04-02 22:17:42 +0000 |
commit | 9909707740ace434078d19bbb2d34fbb2ba907d0 (patch) | |
tree | 5e046176bd481de559f7583e512ef7e9e75c58a4 /gdb/remote-sim.c | |
parent | f74e2365ddbb9298ddf861efd69f4383a857dc90 (diff) | |
download | gdb-9909707740ace434078d19bbb2d34fbb2ba907d0.zip gdb-9909707740ace434078d19bbb2d34fbb2ba907d0.tar.gz gdb-9909707740ace434078d19bbb2d34fbb2ba907d0.tar.bz2 |
* remote-sim.c (gdbsim_open): Check return code from sim_open.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r-- | gdb/remote-sim.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c index 64dbb5d..4655658 100644 --- a/gdb/remote-sim.c +++ b/gdb/remote-sim.c @@ -503,9 +503,9 @@ gdbsim_open (args, from_tty) error ("Insufficient memory available to allocate simulator arg list."); make_cleanup (freeargv, (char *) argv); - /* FIXME: sim_open may call `error' if it fails, but perhaps it should - just return an error indicator and let us call `error'. */ - gdbsim_desc = sim_open (argv); + gdbsim_desc = sim_open (SIM_OPEN_DEBUG, argv); + if (gdbsim_desc == 0) + error ("unable to create simulator instance"); push_target (&gdbsim_ops); target_fetch_registers (-1); |