[PATCH] sim/arm: Prevent crash when running sim with no binary.
Will Newton
will.newton@linaro.org
Tue Oct 29 22:56:00 GMT 2013
2013-10-30 Will Newton <will.newton@linaro.org>
PR gdb/15508
* arm/wrapper.c (sim_create_inferior): Call init before
accessing STATE.
---
sim/arm/wrapper.c | 2 ++
1 file changed, 2 insertions(+)
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));
--
1.8.1.4
More information about the Gdb-patches
mailing list