From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30417 invoked by alias); 1 Oct 2013 10:16:11 -0000 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 Received: (qmail 30403 invoked by uid 89); 1 Oct 2013 10:16:11 -0000 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 01 Oct 2013 10:16:11 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 659CA116475; Tue, 1 Oct 2013 06:16:27 -0400 (EDT) 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 MMkx6B81rDUV; Tue, 1 Oct 2013 06:16:27 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 42260116376; Tue, 1 Oct 2013 06:16:27 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 48FC0E0486; Tue, 1 Oct 2013 12:16:08 +0200 (CEST) Date: Tue, 01 Oct 2013 10:16:00 -0000 From: Joel Brobecker To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/7] Remove field value_of_root Message-ID: <20131001101608.GD2840@adacore.com> References: <1379512482-31773-1-git-send-email-yao@codesourcery.com> <1379512482-31773-4-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1379512482-31773-4-git-send-email-yao@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-10/txt/msg00030.txt.bz2 > c_value_of_root is used for all languages, so it is unnecessary to > have a field 'value_of_root' any more in 'struct language_specific'. > This patch removes the field 'value_of_root' and use c_value_of_root. > > gdb: > > 2013-09-18 Yao Qi > > * varobj.c (c_value_of_root): Remove declaration. > (cplus_value_of_root, java_value_of_root): Likewise. > (ada_value_of_root): Likewise. > (struct language_specific) : Remove. > (languages): Update initialization. > (check_scope): Moved earlier. > (c_value_of_root): Renamed to ... > (value_of_root_1): ... this. > (value_of_root): Caller update. > (cplus_value_of_root, java_value_of_root): Remove. > (ada_value_of_root): Remove. I think it's a step in the right direction, as I don't see how we would want a language-specific value-of-root. So, LGTM, but could you also add an empty line after the description of function check_scope? Also, Could you mention that "c_value_of_root" was moved earlier as well (ie: "Move earlier and renamed to..."). > +/* If frame associated with VAR can be found, switch > + to it and return 1. Otherwise, return 0. */ > +static int > +check_scope (struct varobj *var) Thanks, -- Joel