From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4952 invoked by alias); 21 Oct 2008 00:47:13 -0000 Received: (qmail 4943 invoked by uid 22791); 21 Oct 2008 00:47:13 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 21 Oct 2008 00:46:33 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 74F2810813; Tue, 21 Oct 2008 00:46:31 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 3D32C104AC; Tue, 21 Oct 2008 00:46:31 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Ks5OI-0001mt-Cc; Mon, 20 Oct 2008 20:46:30 -0400 Date: Tue, 21 Oct 2008 00:47:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann Cc: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: [RFC/RFA] add struct parse_context to all command functions Message-ID: <20081021004630.GA6571@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , Joel Brobecker , gdb-patches@sourceware.org References: <20081009140424.GD5372@adacore.com> <20081020161614.GB6251@adacore.com> <1224529335.28191.14.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1224529335.28191.14.camel@localhost.localdomain> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-10/txt/msg00499.txt.bz2 On Mon, Oct 20, 2008 at 05:02:14PM -0200, Thiago Jung Bauermann wrote: > El lun, 20-10-2008 a las 09:16 -0700, Joel Brobecker escribió: > > Har har har, I should be able to be active again soon :-) > > Hooray. :-) > > > So we have 3 alternatives: > > > > 1. All command functions receive the parse_context structure. > > Do the transition all at once. Personally, I prefer this one, unless the person doing the work (that's you!) doesn't agree. > THe problem with (3) is that you make the code slightly more complex by > adding an additional add_*_cmd that the GDB hacker will have to learn > about. I also worry that there will end up being a combinatorial explosion of these things. > The advantage is that you can avoid writing functions with argument > they'll never use. I mention this because the ProjectIdeas wiki page > mentions that it's desirable to have GDB compile with -Wunused. > > IMHO I prefer to use (3) and have the option of using the -Wunused later > (not that I'm stepping up to the task! :-) ). Let's not use this as a design decision. IMO it is not too ugly to mark unused arguments with e.g. ATTRIBUTE_UNUSED; that's what GCC does. -- Daniel Jacobowitz CodeSourcery