* interp.c (sim_create_inferior): Fix crashes on zero PROG_BFD or ARGV.
+2010-02-27 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * interp.c (sim_create_inferior): Fix crashes on zero PROG_BFD or ARGV.
+
2010-02-03 Anthony Green <green@moxielogic.com>
* interp.c (sim_resume): nop is 0x0f, and 0x00 is an illegal
set_initial_gprs ();
issue_messages = l;
- cpu.asregs.regs[PC_REGNO] = bfd_get_start_address (prog_bfd);
+ if (prog_bfd != NULL)
+ cpu.asregs.regs[PC_REGNO] = bfd_get_start_address (prog_bfd);
/* Copy args into target memory. */
avp = argv;
- for (argc = 0; *avp; avp++)
+ for (argc = 0; avp && *avp; avp++)
argc++;
/* Target memory looks like this: