This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sim/arm: Prevent crash when running sim with no binary.
- From: Will Newton <will dot newton at linaro dot org>
- To: gdb-patches at sourceware dot org
- Cc: Patch Tracking <patches at linaro dot org>
- Date: Tue, 29 Oct 2013 15:56:13 -0700
- Subject: [PATCH] sim/arm: Prevent crash when running sim with no binary.
- Authentication-results: sourceware.org; auth=none
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