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 bad626f99c9d9a23c7a921253537a5bfcd355a6b..b7ebb053b717bc62a31861c65b4036303bd28499 100644 (file)
@@ -1,3 +1,9 @@
+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
index cf10e782a1f27c2fea2612aa0460cb54afaec5a6..b7bf400c60698e6520806a6b9648373366047482 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));