This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] sim/arm: Prevent crash when running sim with no binary.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]