From f7d2f538186f0b4f59b14d8da9de0f6259d45484 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 17 Apr 1997 11:14:21 +0000 Subject: [PATCH] * run.c (main): Check return value of sim_open. --- sim/common/ChangeLog | 2 ++ sim/common/run.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 325a97f12c5..2509f2b3854 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,7 @@ Thu Apr 17 02:25:11 1997 Doug Evans + * 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. diff --git a/sim/common/run.c b/sim/common/run.c index 6740f69ce4a..15497ec81d9 100644 --- a/sim/common/run.c +++ b/sim/common/run.c @@ -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); -- 2.30.2