* 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.
This commit is contained in:
Doug Evans
2008-12-14 20:51:04 +00:00
parent 023eb17ca2
commit bca929d3a6
12 changed files with 125 additions and 42 deletions

View File

@@ -55,7 +55,7 @@ set_breakpoint_at (CORE_ADDR where, int (*handler) (CORE_ADDR))
if (breakpoint_data == NULL)
error ("Target does not support breakpoints.");
bp = malloc (sizeof (struct breakpoint));
bp = xmalloc (sizeof (struct breakpoint));
memset (bp, 0, sizeof (struct breakpoint));
(*the_target->read_memory) (where, bp->old_data,