This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / sim / common / sim-model.c
index a126fb16c6640efa182283b0e345dace097d0275..8037dcd3c45bfb2a17e11a508ce71238bdd2604f 100644 (file)
@@ -197,6 +197,13 @@ sim_model_init (SIM_DESC sd)
       /* Use the default model for the selected machine.
         The default model is the first one in the list.  */
       const MACH *mach = sim_mach_lookup_bfd_name (STATE_ARCHITECTURE (sd)->printable_name);
+
+      if (mach == NULL)
+       {
+         sim_io_eprintf (sd, "unsupported machine `%s'\n",
+                         STATE_ARCHITECTURE (sd)->printable_name);
+         return SIM_RC_FAIL;
+       }
       sim_model_set (sd, NULL, MACH_MODELS (mach));
     }
   else
This page took 0.022999 seconds and 4 git commands to generate.