From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22187 invoked by alias); 30 Jan 2015 03:40:03 -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 22156 invoked by uid 89); 30 Jan 2015 03:40:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com 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; Fri, 30 Jan 2015 03:39:59 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B59F21166E8; Thu, 29 Jan 2015 22:39:57 -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 FSZDdAiQYhuB; Thu, 29 Jan 2015 22:39:57 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 53B57116673; Thu, 29 Jan 2015 22:39:57 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id BE47B491CD; Fri, 30 Jan 2015 07:39:53 +0400 (RET) Date: Fri, 30 Jan 2015 18:55:00 -0000 From: Joel Brobecker To: Simon Marchi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/6] Set varobj->path_expr in varobj_get_path_expr Message-ID: <20150130033953.GO5193@adacore.com> References: <1422559716-5480-1-git-send-email-simon.marchi@ericsson.com> <1422559716-5480-3-git-send-email-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422559716-5480-3-git-send-email-simon.marchi@ericsson.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-01/txt/msg00795.txt.bz2 > 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! -- Joel