* main.c (captured_main): Delete call to init_malloc.
* defs.h (init_malloc): Delete declaration.
* utils.c (mmalloc, mrealloc, mcalloc, mfree)
(init_malloc): Delete functions.
Index: testsuite/ChangeLog
2004-08-10 Andrew Cagney <cagney@gnu.org>
* gdb.gdb/selftest.exp (do_steps_and_nexts): Remove code to skip
init_malloc call.
2004-08-10 Andrew Cagney <cagney@gnu.org>
+ * main.c (captured_main): Delete call to init_malloc.
+ * defs.h (init_malloc): Delete declaration.
+ * utils.c (mmalloc, mrealloc, mcalloc, mfree)
+ (init_malloc): Delete functions.
+
* defs.h (xmfree): Delete.
* utils.c (xmfree): Delete function.
(xfree): Inline calls to xmfree and mfree.
extern char *safe_strerror (int);
-extern void init_malloc (void *);
-
extern void request_quit (int);
extern void do_cleanups (struct cleanup *);
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
- /* This needs to happen before the first use of malloc. */
- init_malloc (NULL);
-
#ifdef HAVE_SBRK
lim_at_start = (char *) sbrk (0);
#endif
+2004-08-10 Andrew Cagney <cagney@gnu.org>
+
+ * gdb.gdb/selftest.exp (do_steps_and_nexts): Remove code to skip
+ init_malloc call.
+
2004-08-10 Michael Chastain <mec.gnu@mindspring.com>
* ChangeLog: Add copyright notice. The notice is copied
set description "next over mac_init and everything it calls"
set command "next"
}
- -re ".*init_malloc.*$gdb_prompt $" {
- set description "next over init_malloc and everything it calls"
- set command "next"
- }
-re ".*lim_at_start.*$gdb_prompt $" {
set description "next over lim_at_start initialization"
set command "next"
quit ();
}
\f
-/* Memory management stuff (malloc friends). */
-
-static void *
-mmalloc (void *md, size_t size)
-{
- return malloc (size); /* NOTE: GDB's only call to malloc() */
-}
-
-static void *
-mrealloc (void *md, void *ptr, size_t size)
-{
- if (ptr == 0) /* Guard against old realloc's */
- return mmalloc (md, size);
- else
- return realloc (ptr, size); /* NOTE: GDB's only call to ralloc() */
-}
-
-static void *
-mcalloc (void *md, size_t number, size_t size)
-{
- return calloc (number, size); /* NOTE: GDB's only call to calloc() */
-}
-
-static void
-mfree (void *md, void *ptr)
-{
- free (ptr); /* NOTE: GDB's only call to free() */
-}
-
-/* This used to do something interesting with USE_MMALLOC.
- * It can be retired any time. -- chastain 2004-01-19. */
-void
-init_malloc (void *md)
-{
-}
-
/* Called when a memory allocation fails, with the number of bytes of
memory requested in SIZE. */