From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9162 invoked by alias); 28 Feb 2008 16:50:40 -0000 Received: (qmail 9150 invoked by uid 22791); 28 Feb 2008 16:50:39 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 28 Feb 2008 16:50:19 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m1SGoHtv031885 for ; Thu, 28 Feb 2008 11:50:17 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m1SGoHj3028069 for ; Thu, 28 Feb 2008 11:50:17 -0500 Received: from opsy.redhat.com (vpn-15-111.rdu.redhat.com [10.11.15.111]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m1SGoB3h023145; Thu, 28 Feb 2008 11:50:11 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 056143780C3; Thu, 28 Feb 2008 09:00:43 -0700 (MST) To: gdb-patches@sources.redhat.com Subject: Re: Patch: 'show args' -vs- '--args' References: <20080228164043.GD31695@caradoc.them.org> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Thu, 28 Feb 2008 16:54:00 -0000 In-Reply-To: <20080228164043.GD31695@caradoc.them.org> (Daniel Jacobowitz's message of "Thu\, 28 Feb 2008 11\:40\:43 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-02/txt/msg00477.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> Anyway, now that it's a show_func... >> +notice_args_read (struct cmd_list_element *c) >> { >> - deprecated_show_value_hack (file, from_tty, c, value); >> /* Might compute the value. */ >> get_inferior_args (); >> } Daniel> wouldn't just swapping those two function calls fix it? I suppose it could if we did this: deprecated_show_value_hack (file, from_tty, c, get_inferior_args ()); i.e., we didn't print the passed-in value -- that value is already known to be wrong. It seems a little weird to do this, given that this function is named 'deprecated_...', and given that there is an existing hook that does exactly what is needed here. That aid I'm happy to resubmit a patch based on this idea if that is what you want, just let me know. Tom