From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30605 invoked by alias); 10 Aug 2004 22:38:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30597 invoked from network); 10 Aug 2004 22:38:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 10 Aug 2004 22:38:46 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7AMcfe3004972 for ; Tue, 10 Aug 2004 18:38:46 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7AMcUa06089; Tue, 10 Aug 2004 18:38:36 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 5E3BF2B9D; Tue, 10 Aug 2004 18:38:25 -0400 (EDT) Message-ID: <41194E61.2050801@gnu.org> Date: Tue, 10 Aug 2004 22:38:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040801 MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: [obish] Zap m* methods Content-Type: multipart/mixed; boundary="------------060704090203020506090809" X-SW-Source: 2004-08/txt/msg00376.txt.bz2 This is a multi-part message in MIME format. --------------060704090203020506090809 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 205 Final one, this zaps mmalloc, et.al., along with init_malloc (the latter also removed from selftest.exp). The former are never called, the latter is empty. Tested on PPC NetBSD m/c. committed, Andrew --------------060704090203020506090809 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 3370 2004-08-10 Andrew Cagney * 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 * gdb.gdb/selftest.exp (do_steps_and_nexts): Remove code to skip init_malloc call. Index: defs.h =================================================================== RCS file: /cvs/src/src/gdb/defs.h,v retrieving revision 1.158 diff -p -u -r1.158 defs.h --- defs.h 10 Aug 2004 21:52:04 -0000 1.158 +++ defs.h 10 Aug 2004 22:28:04 -0000 @@ -358,8 +358,6 @@ extern int subset_compare (char *, char extern char *safe_strerror (int); -extern void init_malloc (void *); - extern void request_quit (int); extern void do_cleanups (struct cleanup *); Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.43 diff -p -u -r1.43 main.c --- main.c 26 Jul 2004 19:01:51 -0000 1.43 +++ main.c 10 Aug 2004 22:28:04 -0000 @@ -157,9 +157,6 @@ captured_main (void *data) 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 Index: utils.c =================================================================== RCS file: /cvs/src/src/gdb/utils.c,v retrieving revision 1.130 diff -p -u -r1.130 utils.c --- utils.c 10 Aug 2004 21:52:05 -0000 1.130 +++ utils.c 10 Aug 2004 22:28:04 -0000 @@ -983,42 +983,6 @@ request_quit (int signo) quit (); } -/* 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. */ Index: testsuite/gdb.gdb/selftest.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.gdb/selftest.exp,v retrieving revision 1.1 diff -p -u -r1.1 selftest.exp --- testsuite/gdb.gdb/selftest.exp 19 Jul 2004 13:58:21 -0000 1.1 +++ testsuite/gdb.gdb/selftest.exp 10 Aug 2004 22:28:05 -0000 @@ -105,10 +105,6 @@ proc do_steps_and_nexts {} { 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" --------------060704090203020506090809--