sim/arm: Prevent crash when running sim with no binary.
authorWill Newton <will.newton@linaro.org>
Tue, 29 Oct 2013 16:43:07 +0000 (09:43 -0700)
committerWill Newton <will.newton@linaro.org>
Thu, 7 Nov 2013 16:02:51 +0000 (16:02 +0000)
2013-11-07  Will Newton  <will.newton@linaro.org>

PR gdb/15508
* arm/wrapper.c (sim_create_inferior): Call init before
accessing STATE.

sim/ChangeLog
sim/arm/wrapper.c

index bad626f..b7ebb05 100644 (file)
@@ -1,5 +1,11 @@
 2013-11-07  Will Newton  <will.newton@linaro.org>
 
+       PR gdb/15508
+       * arm/wrapper.c (sim_create_inferior): Call init before
+       accessing STATE.
+
+2013-11-07  Will Newton  <will.newton@linaro.org>
+
        PR gdb/9195
        * arm/wrapper.c (sim_create_inferior): Avoid calling
        bfd_get_mach with a NULL bfd.
index cf10e78..b7bf400 100644 (file)
@@ -243,6 +243,8 @@ sim_create_inferior (sd, abfd, argv, env)
   int mach;
   char **arg;
 
+  init ();
+
   if (abfd != NULL)
     {
       ARMul_SetPC (state, bfd_get_start_address (abfd));