From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14726 invoked by alias); 13 Sep 2011 21:53:38 -0000 Received: (qmail 14715 invoked by uid 22791); 13 Sep 2011 21:53:37 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Sep 2011 21:53:19 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8DLrFP2032362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 13 Sep 2011 17:53:15 -0400 Received: from host1.jankratochvil.net (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8DLrDNq028367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Sep 2011 17:53:14 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p8DLrCOO020360; Tue, 13 Sep 2011 23:53:12 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p8DLrBUR020359; Tue, 13 Sep 2011 23:53:11 +0200 Date: Wed, 14 Sep 2011 05:04:00 -0000 From: Jan Kratochvil To: Abhijit Halder Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: Some code-cleanup Message-ID: <20110913215311.GA20018@host1.jankratochvil.net> References: <201109121623.04292.pedro@codesourcery.com> <20110913092440.GA12661@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-09/txt/msg00241.txt.bz2 On Tue, 13 Sep 2011 14:20:15 +0200, Abhijit Halder wrote: > --- gdb/parse.c 17 Jun 2011 20:24:22 -0000 1.110 > +++ gdb/parse.c 13 Sep 2011 12:09:19 -0000 > @@ -23,7 +23,7 @@ > along with this program. If not, see . */ > > /* Parse an expression from text in a string, > - and return the result as a struct expression pointer. > + and return the result as a struct expression pointer. > That structure contains arithmetic operations in reverse polish, > with constants represented by operations that are followed by special data. > See expression.h for the details of the format. This change is missing in the FSF changeLog. (sorry but it is AFAIK a FSF policy) > @@ -190,7 +190,7 @@ free_funcalls (void *ignore) > } > } > > -/* This page contains the functions for adding data to the struct expression > +/* This page contains the functions for adding data to the struct expression > being constructed. */ > > /* Add one element to the end of the expression. */ This change is missing in the FSF changeLog. > @@ -199,7 +199,7 @@ free_funcalls (void *ignore) > a register through here. */ > > void > -write_exp_elt (union exp_element expelt) > +write_exp_elt (const union exp_element *expelt) > { > if (expout_ptr >= expout_size) > { This function should be made `static' as I wrote before. > @@ -1059,7 +1059,7 @@ prefixify_subexp (struct expression *ine > } > > /* Read an expression from the string *STRINGPTR points to, > - parse it, and return a pointer to a struct expression that we malloc. > + parse it, and return a pointer to a struct expression that we malloc. > Use block BLOCK as the lexical context for variable names; > if BLOCK is zero, use the block of the selected stack frame. > Meanwhile, advance *STRINGPTR to point after the expression, This change is missing in the FSF changeLog. > --- gdb/parser-defs.h 10 Jan 2011 20:38:49 -0000 1.39 > +++ gdb/parser-defs.h 13 Sep 2011 12:09:19 -0000 > @@ -131,7 +131,7 @@ union type_stack_elt > extern union type_stack_elt *type_stack; > extern int type_stack_depth, type_stack_size; > > -extern void write_exp_elt (union exp_element); > +extern void write_exp_elt (const union exp_element *); > > extern void write_exp_elt_opcode (enum exp_opcode); > This declaration line should be removed completely as I wrote before. write_exp_elt is not called from any other file so I find updating a declaration which has no use anyway does not make much sense. OK with these changes, if you follow the changes. Thanks, Jan