aboutsummaryrefslogtreecommitdiff
path: root/sim/arm
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/arm
parent8782aa321e1bb466012a71791b8a40e2cb42d841 (diff)
downloadbinutils-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.zip
binutils-1ed6c797ef8814d7f273a0ccc5cf7ebbce497933.tar.gz
binutils-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/arm')
-rw-r--r--sim/arm/wrapper.c2
1 files changed, 2 insertions, 0 deletions
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));