From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4025 invoked by alias); 27 Nov 2002 19:37:43 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 4012 invoked from network); 27 Nov 2002 19:37:42 -0000 Received: from unknown (HELO dragon.nuxi.com) (66.93.134.19) by sources.redhat.com with SMTP; 27 Nov 2002 19:37:42 -0000 Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.6/8.12.2) with ESMTP id gARJbRqe032196; Wed, 27 Nov 2002 11:37:27 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.6/8.12.6/Submit) id gARJaBDB028581; Wed, 27 Nov 2002 11:36:11 -0800 (PST) Date: Wed, 27 Nov 2002 11:37:00 -0000 From: "David O'Brien" To: Andrew Cagney Cc: Klee Dienes , Alan Modra , binutils@sources.redhat.com, gdb@sources.redhat.com Subject: Re: [RFA] Replace strdup with xstrdup in tic30-dis.c Message-ID: <20021127193609.GA16723@dragon.nuxi.com> Reply-To: obrien@FreeBSD.org References: <3DDBB2BA.90601@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DDBB2BA.90601@redhat.com> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 X-SW-Source: 2002-11/txt/msg00395.txt.bz2 On Wed, Nov 20, 2002 at 11:05:14AM -0500, Andrew Cagney wrote: > >Another option would be to add a xmalloc_set_failure_handler() to > >libiberty for use by GDB. > > Just FYI, GDB is currently intercepting the calls by implementing its > own xmalloc() and having them linked in before libiberty. See utils.c. This has also caused us problems in FreeBSD'ville as we share libiberty with binutils and gdb. What about having a real handler that is registered? Even using a function pointer XMALLOC in which it's main()'s job to set to what ever malloc is desired would help.