From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71993 invoked by alias); 22 Nov 2016 16:50:51 -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 71983 invoked by uid 89); 22 Nov 2016 16:50:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=hey 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 ESMTP; Tue, 22 Nov 2016 16:50:49 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EF5C011677F; Tue, 22 Nov 2016 11:50:47 -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 71+7H-xuQsBC; Tue, 22 Nov 2016 11:50:47 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BC994116560; Tue, 22 Nov 2016 11:50:47 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 464D7424E9; Tue, 22 Nov 2016 08:50:46 -0800 (PST) Date: Tue, 22 Nov 2016 16:50:00 -0000 From: Joel Brobecker To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] New function value_has_address Message-ID: <20161122165046.GE4132@adacore.com> References: <1479829721-22162-1-git-send-email-yao.qi@linaro.org> <1479829721-22162-2-git-send-email-yao.qi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1479829721-22162-2-git-send-email-yao.qi@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2016-11/txt/msg00636.txt.bz2 Hey Yao, > +/* Return true if VALUE has address, otherwise return false. */ > + > +static int > +value_has_address (const struct value *value) > +{ > + return (value->lval != lval_internalvar > + && value->lval != lval_internalvar_component > + && value->lval != lval_xcallable); I'm wondering about the function's name. Does a value that lives in a register, for instance, really have an address? For me, if there was a function value_has_address, it would return nonzero only for lval_memory. I'm not too sure if lval_computed would qualify or not. Perhaps, what you were looking for, is something like value_lives_in_inferior? -- Joel