From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3016 invoked by alias); 28 Oct 2008 17:52:29 -0000 Received: (qmail 2795 invoked by uid 22791); 28 Oct 2008 17:52:28 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Oct 2008 17:51:53 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id m9SHon2a030835; Tue, 28 Oct 2008 13:50:49 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m9SHomWg030809; Tue, 28 Oct 2008 13:50:48 -0400 Received: from opsy.redhat.com (vpn-12-121.rdu.redhat.com [10.11.12.121]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id m9SHokxj010925; Tue, 28 Oct 2008 13:50:47 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id EF76A3786F3; Tue, 28 Oct 2008 11:50:45 -0600 (MDT) To: "Ulrich Weigand" Cc: brobecker@adacore.com (Joel Brobecker), gdb-patches@sourceware.org Subject: Re: [RFC/RFA] add struct parse_context to all command functions References: <200810281624.m9SGOxVt015677@d12av02.megacenter.de.ibm.com> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Tue, 28 Oct 2008 18:17:00 -0000 In-Reply-To: <200810281624.m9SGOxVt015677@d12av02.megacenter.de.ibm.com> (Ulrich Weigand's message of "Tue\, 28 Oct 2008 17\:24\:59 +0100 \(CET\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (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-10/txt/msg00680.txt.bz2 >>>>> "Ulrich" == Ulrich Weigand writes: Ulrich> This is OK, thanks! Thanks -- I checked it in. Ulrich> - As all the top-level val_print callers set deref_ref to 1, maybe the Ulrich> default user_print_options should have that value, making most (all?) Ulrich> of the explicit opts.deref_ref = 1 statements obsolete. Ulrich> - Maybe the "size" argument (to the print_formatted routines) should Ulrich> also move into the struct, together with "format"? I'll look at these two. Ulrich> - In some cases (e.g. print_subexp_standard) you have multiple instances Ulrich> within the same function where a local "opts" variable is created; Ulrich> maybe it would be clearer to have a common "opts" initialized once Ulrich> for the whole function? In a long function, like print_subexp_standard, I find it clearer to have variables declared as locally as possible, because it is simpler to see all the code referencing the local at once. Tom