From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12303 invoked by alias); 30 Jan 2015 19:46:16 -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 12269 invoked by uid 89); 30 Jan 2015 19:46:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: usevmg21.ericsson.net Received: from usevmg21.ericsson.net (HELO usevmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 30 Jan 2015 19:46:11 +0000 Received: from EUSAAHC002.ericsson.se (Unknown_Domain [147.117.188.78]) by usevmg21.ericsson.net (Symantec Mail Security) with SMTP id 49.36.25146.1508BC45; Fri, 30 Jan 2015 14:00:02 +0100 (CET) Received: from [142.133.110.232] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.80) with Microsoft SMTP Server id 14.3.195.1; Fri, 30 Jan 2015 14:46:09 -0500 Message-ID: <54CBDF81.5090702@ericsson.com> Date: Fri, 30 Jan 2015 22:58:00 -0000 From: Simon Marchi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Joel Brobecker CC: Subject: Re: [PATCH 3/6] Set varobj->path_expr in varobj_get_path_expr References: <1422559716-5480-1-git-send-email-simon.marchi@ericsson.com> <1422559716-5480-3-git-send-email-simon.marchi@ericsson.com> <20150130033953.GO5193@adacore.com> In-Reply-To: <20150130033953.GO5193@adacore.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00802.txt.bz2 On 15-01-29 10:39 PM, Joel Brobecker wrote: >> It seems like different languages are doing this differently (e.g. >> C and Ada). For C, var->path_expr is set inside c_path_expr_of_child. >> The next time the value is requested, is it therefore not recomputed. >> Ada does not set this field, but just returns the value. Since the field >> is never set, the value is recomputed every time it is requested. >> >> This patch makes it so that path_expr_of_child's only job is to compute >> the path expression, not save/cache the value. The field is set by the >> varobj common code. > > Nice little cleanup, IMO. Thanks for doing it. > >> gdb/ChangeLog: >> >> * varobj.c (varobj_get_path_expr): Set var->path_expr. >> * c-varobj.c (c_path_expr_of_child): Set local var instead of >> child->path_expr. >> (cplus_path_expr_of_child): Same. > > LGTM. Thank you! Pushed, thanks!