aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorWill Newton <will.newton@linaro.org>2013-10-29 09:43:07 -0700
committerWill Newton <will.newton@linaro.org>2013-11-07 16:02:51 +0000
commit1ed6c797ef8814d7f273a0ccc5cf7ebbce497933 (patch)
treed82ec439ec225f9a1191655cfa468e1561cc47d2 /sim
parent8782aa321e1bb466012a71791b8a40e2cb42d841 (diff)
downloadgdb-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.zip
gdb-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.tar.gz
gdb-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.tar.bz2
sim/arm: Prevent crash when running sim with no binary.
2013-11-07 Will Newton <will.newton@linaro.org> PR gdb/15508 * arm/wrapper.c (sim_create_inferior): Call init before accessing STATE.
Diffstat (limited to 'sim')
-rw-r--r--sim/ChangeLog6
-rw-r--r--sim/arm/wrapper.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index bad626f..b7ebb05 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -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.
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index cf10e78..b7bf400 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -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));