From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8594 invoked by alias); 3 Feb 2009 13:02:20 -0000 Received: (qmail 8394 invoked by uid 22791); 3 Feb 2009 13:02:20 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e24smtp03.br.ibm.com (HELO e24smtp03.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Feb 2009 13:02:15 +0000 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by e24smtp03.br.ibm.com (8.13.1/8.13.1) with ESMTP id n13D11am011105 for ; Tue, 3 Feb 2009 11:01:01 -0200 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n13E1eMO909404 for ; Tue, 3 Feb 2009 11:01:40 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n13D2Bxf019901 for ; Tue, 3 Feb 2009 11:02:12 -0200 Received: from [9.8.5.242] ([9.8.5.242]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n13D2BhI019896; Tue, 3 Feb 2009 11:02:11 -0200 Subject: Re: [RFA] Add la_getstr member to language_defn From: Thiago Jung Bauermann To: Joel Brobecker Cc: Daniel Jacobowitz , gdb-patches ml In-Reply-To: <20090203002336.GB3964@adacore.com> References: <1227417278.28256.183.camel@localhost.localdomain> <20081123161013.GA15069@caradoc.them.org> <1227490821.8533.25.camel@hotblack.bauerhaus> <20081124022858.GA19331@caradoc.them.org> <1227551659.28256.225.camel@localhost.localdomain> <20081124202146.GA1991@caradoc.them.org> <1227564549.28256.248.camel@localhost.localdomain> <1230949603.8380.143.camel@localhost.localdomain> <20090203002336.GB3964@adacore.com> Content-Type: text/plain; charset=utf-8 Date: Tue, 03 Feb 2009 13:02:00 -0000 Message-Id: <1233666130.14735.11.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 2009-02/txt/msg00056.txt.bz2 El lun, 02-02-2009 a las 16:23 -0800, Joel Brobecker escribió: > > The patch doesn't apply anymore. This is the same patch, refreshed > > against HEAD as of Dec 28th. Ok? > > Just a few comments and questions in addition to Tom's comments... Great. Thanks! > > + if ((TYPE_NFIELDS (type) == 1) > > + && TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_RANGE) > > The extra parens around "TYPE_NFIELDS (type) == 1" shouldn't be > necessary, right? In this case, it's pretty harmless, but a little > bit below, this really starts making it hard to read a condition... Right. Changed. > > + if (((VALUE_LVAL (value) == not_lval) > > + || (VALUE_LVAL (value) == lval_internalvar)) && (fetchlimit != UINT_MAX)) > > Can this be formatted as follow: > > if ((VALUE_LVAL (value) == not_lval > || VALUE_LVAL (value) == lval_internalvar) > && fetchlimit != UINT_MAX) > > ? (assuming my reading is correct!) The reason I like my suggestion > is because there are less parentheses, so it's easier to match them > without using my favorite editor; also, the formatting makes it clear > at which level the || and the && operators are. Changed. > > + if ((TYPE_CODE (element_type) != TYPE_CODE_INT) > > + && (TYPE_CODE (element_type) != TYPE_CODE_CHAR)) > > Same here. Ok. > > @@ -511,6 +626,7 @@ const struct language_defn minimal_language_defn = > > c_language_arch_info, > > default_print_array_index, > > default_pass_by_reference, > > + default_get_string, > > LANG_MAGIC > > }; > > I was wondering if it wouldn't be more useful to use the c_get_string > function as the default rather than the default_get_string stub. > What do you guys think? I don't have an opinion here, since I know little about how other languages represent strings... -- []'s Thiago Jung Bauermann IBM Linux Technology Center