* 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 325a97f12c5978fffa80cc06ed7f27c92377c068..2509f2b385402efc59a93f293d27bb1d1063b457 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 6740f69ce4a2340bbcb0f90cdec2f328a8146b69..15497ec81d963165ca0518c9066fdcd1c028b5b9 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);