2009-11-12 Tristan Gingold <gingold@adacore.com>

* avr/interp.c (sim_load): Clear memory before loading.
This commit is contained in:
Tristan Gingold 2009-11-12 15:17:42 +00:00
parent f24fce7781
commit 33bcfade88
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2009-11-12 Tristan Gingold <gingold@adacore.com>
* avr/interp.c (sim_load): Clear memory before loading.
2009-11-09 Tristan Gingold <gingold@adacore.com>
* avr/interp.c (sim_resume): Fix typo for OP_ret.

View File

@ -1793,6 +1793,10 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
{
bfd *prog_bfd;
/* Clear all the memory. */
memset (sram, 0, sizeof (sram));
memset (flash, 0, sizeof (flash));
prog_bfd = sim_load_file (sd, myname, callback, prog, abfd,
sim_kind == SIM_OPEN_DEBUG,
0, sim_write);