* run.c (main): Check return value of sim_open.
authorDavid Edelsohn <dje.gcc@gmail.com>
Thu, 17 Apr 1997 11:14:21 +0000 (11:14 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Thu, 17 Apr 1997 11:14:21 +0000 (11:14 +0000)
sim/common/ChangeLog
sim/common/run.c

index 325a97f..2509f2b 100644 (file)
@@ -1,5 +1,7 @@
 Thu Apr 17 02:25:11 1997  Doug Evans  <dje@canuck.cygnus.com>
 
+       * run.c (main): Check return value of sim_open.
+
        * Make-common.in (sim-options.o, sim-load.o): Add rules for.
        (sim_main_headers): Add sim-trace.h.
        * run.c (exec_bfd, target_byte_order): Delete.
index 6740f69..15497ec 100644 (file)
@@ -198,6 +198,8 @@ main (ac, av)
   /* Ensure that any run-time initialisation that needs to be
      performed by the simulator can occur. */
   sd = sim_open (SIM_OPEN_STANDALONE, sim_argv);
+  if (sd == 0)
+    exit (1);
 
   if (sim_load (sd, name, abfd, 0) == SIM_RC_FAIL)
     exit (1);