From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 457 invoked by alias); 11 Dec 2002 18:20:34 -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 413 invoked from network); 11 Dec 2002 18:20:31 -0000 Received: from unknown (HELO zenia.red-bean.com) (66.244.67.22) by sources.redhat.com with SMTP; 11 Dec 2002 18:20:31 -0000 Received: from zenia.red-bean.com (localhost.localdomain [127.0.0.1]) by zenia.red-bean.com (8.12.5/8.12.5) with ESMTP id gBBI0M5h007203; Wed, 11 Dec 2002 13:00:23 -0500 Received: (from jimb@localhost) by zenia.red-bean.com (8.12.5/8.12.5/Submit) id gBBI0KP5007199; Wed, 11 Dec 2002 13:00:20 -0500 To: Andrew Cagney CC: gdb-patches@sources.redhat.com Subject: Re: [RFA] dwarf2read.c: complain() -> complaint() References: <1021209233902.ZM5908@localhost.localdomain> <3DF6129C.9000700@redhat.com> From: Jim Blandy Date: Wed, 11 Dec 2002 10:47:00 -0000 In-Reply-To: <3DF6129C.9000700@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.92 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00361.txt.bz2 Andrew Cagney writes: > > In a recently submitted patch, I added a new complaint to dwarf2read.c > > using the old (deprecated) interface. Andrew asked me to use the new > > interface. I've generated a patch for dwarf2read.c which converts all > > calls to complain() to complaint(). > > I've written a script to do this transformation. It finds all of the > > deprecated_complaint structs and counts the uses of these > > structs. (Surprisingly, some were unused!) For cases where there's > > more than > > one occurrence, it creates a new function as suggested in > > complaints.h. For the rest, it performs the obvious transformation. > > The script also uses GNU indent to perform localized reindentations > > of > > the affected text. > > If this patch is accepted (and this approach is deemed acceptable), > > I'll > > generate patches for the other files which still use complain(). > > Definitly fine with the theory. Two reservations (really just one). > > - how is the result with -Wformat? The reason behind switching from > complain() to complaint was to get the parameters checked and hence > find some nasty address printing bugs. > > - I suspect it will need a visual audit to check for any cases of: > "%08lx", (long) core_addr_variable > > Looking through this specific patch, though, turned up no cases where > this occured. So you must have that those problems covered. > > Symtab maintainers? It looks fine to me. I was uncomfortable with the idea of having to create wrapper functions at first --- the idea being that each occurrence of a complaint string is its own independent complaint --- but it seems like it'll do the right thing by default more often than making people create complaint structures. So I'll go with that.