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.
This commit is contained in:
Will Newton 2013-10-29 09:43:07 -07:00
parent 8782aa321e
commit 1ed6c797ef
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,9 @@
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

View file

@ -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));