2009-11-12 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Thu, 12 Nov 2009 15:17:42 +0000 (15:17 +0000)
committerTristan Gingold <gingold@adacore.com>
Thu, 12 Nov 2009 15:17:42 +0000 (15:17 +0000)
* avr/interp.c (sim_load): Clear memory before loading.

sim/ChangeLog
sim/avr/interp.c

index 6a5e74e5bb219b418bef22eda6ffdecde0f70f65..18f555cca2f37e3e773ef0a1c383c30b9f5bedf2 100644 (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.
index 903370f8c28532b7e7a1aaad4b14e95da726c1a4..8d267dd853d50be2ada80b7d2fe94bf64aeb80ac 100644 (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);
This page took 0.025979 seconds and 4 git commands to generate.