From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11084 invoked by alias); 15 Oct 2007 15:06:19 -0000 Received: (qmail 11071 invoked by uid 22791); 15 Oct 2007 15:06:17 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 Oct 2007 15:06:09 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 22EE2187021; Mon, 15 Oct 2007 17:10:44 +0200 (CEST) From: "Pierre Muller" To: "'Pierre Muller'" , , "'Daniel Jacobowitz'" , "'Ulrich Weigand'" References: <000c01c80f35$909200b0$b1b60210$@u-strasbg.fr> In-Reply-To: <000c01c80f35$909200b0$b1b60210$@u-strasbg.fr> Subject: RE: [RFA] ARI fix: Remove 3 uses of xasprintf Date: Mon, 15 Oct 2007 15:14:00 -0000 Message-ID: <001c01c80f3c$e8613c00$b923b400$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us 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: 2007-10/txt/msg00388.txt.bz2 It seems that both functions are still used in gdbtk directory. Is this directory still used? I tried 'make insight.exe' (cygwin system). which compiled fine, but ./insight resulted in "Interpreter `insight' unrecognized" Pierre > -----Original Message----- > From: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] On Behalf Of Pierre Muller > Sent: Monday, October 15, 2007 4:14 PM > To: gdb-patches@sourceware.org; 'Daniel Jacobowitz'; 'Ulrich Weigand' > Subject: [RFA] ARI fix: Remove 3 uses of xasprintf > > This removes the 3 remaining uses of > xasprintf function. > > This still leaves the xasprintf and xvasprintf > visible on the ARI web page. > > But this is due to the fact that those two functions > were already local to gdb. > So that there are now two options: > > - 1) Remove their definition, > which will of course prevent efficiently the reappearing > of those function, but might create problems for third > party sources using libgdb and gdb specific functions. > > - 2) Leave the functions present in defs.h and utils.c > and correct ARI sources for their presence in those functions. > > An intermediate solution would be to deprecate them > by adding the 'deprecated_' prefix to their definition. > > Is this change OK? > > > Pierre Muller > > Changelog entry: > > 2007-10-15 Pierre Muller > > * cp-abi.c (set_cp_abi_as_auto_default): ARI fix: > Replace xasprintf by xstrprintf. > sysfile-mem.c (add_vsyscall_page): Ditto. > > > > $ cvs diff -up cp-abi.c symfile-mem.c > Enter passphrase for RSA key '/home/Pierre/.ssh/identity': > Index: cp-abi.c > =================================================================== > RCS file: /cvs/src/src/gdb/cp-abi.c,v > retrieving revision 1.19 > diff -u -p -r1.19 cp-abi.c > --- cp-abi.c 23 Sep 2007 16:25:05 -0000 1.19 > +++ cp-abi.c 15 Oct 2007 13:58:49 -0000 > @@ -193,10 +193,10 @@ set_cp_abi_as_auto_default (const char * > auto_cp_abi = *abi; > > auto_cp_abi.shortname = "auto"; > - xasprintf (&new_longname, "currently \"%s\"", abi->shortname); > + new_longname = xstrprintf ("currently \"%s\"", abi->shortname); > auto_cp_abi.longname = new_longname; > > - xasprintf (&new_doc, "Automatically selected; currently \"%s\"", > + new_doc = xstrprintf ("Automatically selected; currently \"%s\"", > abi->shortname); > auto_cp_abi.doc = new_doc; > > Index: symfile-mem.c > =================================================================== > RCS file: /cvs/src/src/gdb/symfile-mem.c,v > retrieving revision 1.13 > diff -u -p -r1.13 symfile-mem.c > --- symfile-mem.c 23 Aug 2007 18:08:39 -0000 1.13 > +++ symfile-mem.c 15 Oct 2007 13:58:49 -0000 > @@ -196,7 +196,7 @@ try using the \"file\" command first.")) > } > args.bfd = bfd; > args.sysinfo_ehdr = sysinfo_ehdr; > - xasprintf (&args.name, "system-supplied DSO at 0x%s", > + args.name = xstrprintf ("system-supplied DSO at 0x%s", > paddr_nz (sysinfo_ehdr)); > /* Pass zero for FROM_TTY, because the action of loading the > vsyscall DSO was not triggered by the user, even if the user > > >