From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27933 invoked by alias); 18 Jan 2012 12:18:52 -0000 Received: (qmail 27925 invoked by uid 22791); 18 Jan 2012 12:18:50 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Jan 2012 12:18:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5F33F2BB28A; Wed, 18 Jan 2012 07:18:37 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jmI4NvceagNb; Wed, 18 Jan 2012 07:18:37 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DE9212BB289; Wed, 18 Jan 2012 07:18:36 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 6AD88145615; Wed, 18 Jan 2012 16:18:03 +0400 (RET) Date: Wed, 18 Jan 2012 12:48:00 -0000 From: Joel Brobecker To: Sergio Durigan Junior Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Message-ID: <20120118121803.GC31383@adacore.com> References: <20120118045128.GZ31383@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2012-01/txt/msg00667.txt.bz2 > >> 2012-01-18 Sergio Durigan Junior > >> > >> * parse.c (initialize_expout): New function. > >> (reallocate_expout): Likewise. > >> (parse_exp_in_context): Use `initialize_expout' and > >> `reallocate_expout' when appropriate. > > > > FWIW, it seems OK to me on its own. I like the fact that you made > > the initial_size and gdbarch parameters. Sorry for nit-picking, but since it's very minor and can easily be deal with... > +/* Helper function used to initialize an struct expression that is going > + to be used to store expression elements. The arguments are the > + INITIAL_SIZE of the expression, the language LANG parsed to build this > + expression, and the GDBARCH pointer. */ Suggested re-phrasing: /* Helper function to initialize the expout, expout_size, expout_ptr trio before it is used to store expression elements created during the parsing of an expression. INITIAL_SIZE is the initial size of the expout array. LANG is the language used to parse the expression. And GDBARCH is the gdbarch to use during parsing. */ > +/* Helper function that reallocates the EXPOUT in order to eliminate any > + unused space. It is generally used when the expression has just been > + parsed and created. */ Suggest: /* Helper function that frees any unsed space in the expout array. It is generally used when the parser has just been parsed and created. */ (otherwise, remove "the" before "EXPOUT"). Ok with those fixes. -- Joel