diff options
author | Doug Evans <dje@google.com> | 2008-12-14 20:51:04 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2008-12-14 20:51:04 +0000 |
commit | bca929d3a66489b6b2aff2a9a81bc17853dff79e (patch) | |
tree | 01fb0fc214848cab8a2629b58956f92238f7edf5 /gdb/gdbserver/target.c | |
parent | 023eb17ca2bc152be687b0b5676bdb6fda6cd9d1 (diff) | |
download | gdb-bca929d3a66489b6b2aff2a9a81bc17853dff79e.zip gdb-bca929d3a66489b6b2aff2a9a81bc17853dff79e.tar.gz gdb-bca929d3a66489b6b2aff2a9a81bc17853dff79e.tar.bz2 |
* utils.c (xmalloc,xcalloc,xstrdup): New fns.
* server.h (ATTR_MALLOC): New macro.
(xmalloc,xcalloc,xstrdup): Declare.
* hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
* inferiors.c: Ditto.
* linux-low.c: Ditto.
* mem-break.c: Ditto.
* regcache.c: Ditto.
* remote-utils.c: Ditto.
* server.c: Ditto.
* target.c: Ditto.
* win32-low.c: Ditto.
Diffstat (limited to 'gdb/gdbserver/target.c')
-rw-r--r-- | gdb/gdbserver/target.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index 86c62a3..fbc558c 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -77,7 +77,7 @@ write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, if (buffer != NULL) free (buffer); - buffer = malloc (len); + buffer = xmalloc (len); memcpy (buffer, myaddr, len); check_mem_write (memaddr, buffer, len); res = (*the_target->write_memory) (memaddr, buffer, len); @@ -106,6 +106,6 @@ mywait (char *statusp, int connected_wait) void set_target_ops (struct target_ops *target) { - the_target = (struct target_ops *) malloc (sizeof (*the_target)); + the_target = (struct target_ops *) xmalloc (sizeof (*the_target)); memcpy (the_target, target, sizeof (*the_target)); } |