sim/moxie/
* interp.c (sim_create_inferior): Fix crashes on zero PROG_BFD or ARGV.
This commit is contained in:
parent
c3e4ae2903
commit
bc56c8fa67
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2010-02-03 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
* interp.c (sim_resume): nop is 0x0f, and 0x00 is an illegal
|
* interp.c (sim_resume): nop is 0x0f, and 0x00 is an illegal
|
||||||
|
|
|
@ -1307,11 +1307,12 @@ sim_create_inferior (sd, prog_bfd, argv, env)
|
||||||
set_initial_gprs ();
|
set_initial_gprs ();
|
||||||
issue_messages = l;
|
issue_messages = l;
|
||||||
|
|
||||||
|
if (prog_bfd != NULL)
|
||||||
cpu.asregs.regs[PC_REGNO] = bfd_get_start_address (prog_bfd);
|
cpu.asregs.regs[PC_REGNO] = bfd_get_start_address (prog_bfd);
|
||||||
|
|
||||||
/* Copy args into target memory. */
|
/* Copy args into target memory. */
|
||||||
avp = argv;
|
avp = argv;
|
||||||
for (argc = 0; *avp; avp++)
|
for (argc = 0; avp && *avp; avp++)
|
||||||
argc++;
|
argc++;
|
||||||
|
|
||||||
/* Target memory looks like this:
|
/* Target memory looks like this:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue