aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1998-03-04 02:05:06 +0000
committerDoug Evans <dje@google.com>1998-03-04 02:05:06 +0000
commite4726e6dfcf50eb0d95cabbd7a9b39f47d67ccc4 (patch)
treed6d72a248a63c1697d7f07f2e6d9a39f6ee042bd /sim
parent3a012857c64cacf7774ee3173e057f5949b0753e (diff)
downloadgdb-e4726e6dfcf50eb0d95cabbd7a9b39f47d67ccc4.zip
gdb-e4726e6dfcf50eb0d95cabbd7a9b39f47d67ccc4.tar.gz
gdb-e4726e6dfcf50eb0d95cabbd7a9b39f47d67ccc4.tar.bz2
* sim-core.c (sim_core_attach): Use xmalloc instead of zalloc.
Use 0xa5 as initial value. (sim_core_map_detach): Use free instead of zfree. Back out this change.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/sim-core.c9
2 files changed, 3 insertions, 10 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 18255bb..1762b08 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -9,10 +9,6 @@ Mon Mar 2 10:20:06 1998 Doug Evans <devans@seba.cygnus.com>
* Make-common.in (TAGS): Make smarter.
* Makefile.in (TAGS): Ditto.
- * sim-core.c (sim_core_attach): Use xmalloc instead of zalloc.
- Use 0xa5 as initial value.
- (sim_core_map_detach): Use free instead of zfree.
-
Fri Feb 27 19:09:57 1998 Doug Evans <devans@canuck.cygnus.com>
* sim-module.c (*): Fix typos in assertion tests.
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c
index d1f9de1..f583c8e 100644
--- a/sim/common/sim-core.c
+++ b/sim/common/sim-core.c
@@ -22,7 +22,6 @@
#ifndef _SIM_CORE_C_
#define _SIM_CORE_C_
-#include "libiberty.h"
#include "sim-main.h"
#include "sim-assert.h"
@@ -341,10 +340,8 @@ sim_core_attach (SIM_DESC sd,
if (optional_buffer == NULL)
{
int padding = (addr % sizeof (unsigned64));
- unsigned int bytes = (modulo == 0 ? nr_bytes : modulo) + padding;
- free_buffer = xmalloc (bytes);
- /* #if WITH_DETERMINISTIC_SIMULATION? */
- memset (free_buffer, 0xa5, bytes);
+ unsigned long bytes = (modulo == 0 ? nr_bytes : modulo) + padding;
+ free_buffer = zalloc (bytes);
buffer = (char*) free_buffer + padding;
}
else
@@ -428,7 +425,7 @@ sim_core_map_detach (SIM_DESC sd,
sim_core_mapping *dead = (*entry);
(*entry) = dead->next;
if (dead->free_buffer != NULL)
- free (dead->free_buffer);
+ zfree (dead->free_buffer);
zfree (dead);
return;
}