summaryrefslogtreecommitdiff
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)
downloadbinutils-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.tar.gz
binutils-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.tar.bz2
binutils-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.zip
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 bad626f99c9..b7ebb053b71 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 cf10e782a1f..b7bf400c606 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));