diff options
author | Doug Evans <dje@google.com> | 1998-03-02 23:03:32 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-03-02 23:03:32 +0000 |
commit | 0471756934d89e763e969dba58e21945309698bc (patch) | |
tree | f00897d090093e5ecb16928fa097f09e196d8d81 /sim/common/sim-core.c | |
parent | 69d2f4a7445d71bb7bbe34071f4c92dc21a89164 (diff) | |
download | binutils-gdb-0471756934d89e763e969dba58e21945309698bc.tar.gz |
* sim-core.c (sim_core_attach): Revise last patch.
Use 0xa5 as initial value.
Diffstat (limited to 'sim/common/sim-core.c')
-rw-r--r-- | sim/common/sim-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c index 6444f2ee278..e64bc7f5d4f 100644 --- a/sim/common/sim-core.c +++ b/sim/common/sim-core.c @@ -339,7 +339,10 @@ sim_core_attach (SIM_DESC sd, if (optional_buffer == NULL) { int padding = (addr % sizeof (unsigned64)); - free_buffer = xmalloc ((modulo == 0 ? nr_bytes : modulo) + padding); + unsigned int bytes = (modulo == 0 ? nr_bytes : modulo) + padding; + free_buffer = xmalloc (bytes); + /* #if WITH_DETERMINISTIC_SIMULATION? */ + memset (free_buffer, 0xa5, bytes); buffer = (char*) free_buffer + padding; } else |