From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12482 invoked by alias); 4 Aug 2011 09:51:40 -0000 Received: (qmail 12471 invoked by uid 22791); 4 Aug 2011 09:51:40 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,T_FRT_FREE X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Aug 2011 09:51:26 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p749pPpo027297 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Aug 2011 05:51:25 -0400 Received: from host1.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p749pNlR019740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Aug 2011 05:51:24 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p749pMlU005180; Thu, 4 Aug 2011 11:51:22 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p749pLJE005175; Thu, 4 Aug 2011 11:51:21 +0200 Date: Thu, 04 Aug 2011 09:51:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: Daniel Jacobowitz , gdb-patches@sourceware.org Subject: Re: [patch] Make test-cp-name-parser usable Message-ID: <20110804095121.GA4486@host1.jankratochvil.net> References: <20110802170152.GA24932@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-08/txt/msg00067.txt.bz2 On Wed, 03 Aug 2011 22:56:36 +0200, Tom Tromey wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > Daniel> What does the translation - is it as simple as #undef free or > Daniel> (free) (ptr)? > > A sed script in the .y.c rule in gdb/Makefile. -e 's/\([ \t;,(]\)free\([ \t]*[&(),]\)/\1xfree\2/g' \ -e 's/\([ \t;,(]\)free$$/\1xfree/g' \ If it is a concern patched it differently. I will check it in if no comments appear. Thanks, Jan gdb/ 2011-08-02 Jan Kratochvil * cp-name-parser.y (xfree): Wrap the name free by CONCAT2. (main): Uncomment "Demangling error\n". --- a/gdb/cp-name-parser.y +++ b/gdb/cp-name-parser.y @@ -2042,7 +2042,7 @@ void xfree (void *ptr) { if (ptr != NULL) - free (ptr); + CONCAT2 (fr,ee) (ptr); } int @@ -2071,7 +2071,7 @@ main (int argc, char **argv) str2 = cplus_demangle (buf, DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE); if (str2 == NULL) { - /* printf ("Demangling error\n"); */ + printf ("Demangling error\n"); if (c) printf ("%s%c%s\n", buf, c, extra_chars); else