Initialize SIM_DESC properly.
[deliverable/binutils-gdb.git] / sim / moxie / interp.c
index 8b8879f13b3e5555f6eba961200a7f83f77f29d7..8d280f2cc47c2d898c68b230584f1ce069f05be2 100644 (file)
@@ -1176,6 +1176,22 @@ sim_open (kind, cb, abfd, argv)
   
   set_initial_gprs (); /* Reset the GPR registers.  */
   
+  /* Configure/verify the target byte order and other runtime
+     configuration options */
+  if (sim_config (sd) != SIM_RC_OK)
+    {
+      sim_module_uninstall (sd);
+      return 0;
+    }
+
+  if (sim_post_argv_init (sd) != SIM_RC_OK)
+    {
+      /* Uninstall the modules to avoid memory leaks,
+        file descriptor leaks, etc.  */
+      sim_module_uninstall (sd);
+      return 0;
+    }
+
   return sd;
 }
 
This page took 0.023062 seconds and 4 git commands to generate.