From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4209 invoked by alias); 1 Nov 2007 04:52:06 -0000 Received: (qmail 4197 invoked by uid 22791); 1 Nov 2007 04:52:05 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 01 Nov 2007 04:52:03 +0000 Received: from kahikatea.snap.net.nz (214.62.255.123.dynamic.snap.net.nz [123.255.62.214]) by viper.snap.net.nz (Postfix) with ESMTP id 4919E3DA13D; Thu, 1 Nov 2007 17:52:00 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id E93198FC6D; Thu, 1 Nov 2007 17:51:58 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18217.23406.21406.920384@kahikatea.snap.net.nz> Date: Thu, 01 Nov 2007 04:52:00 -0000 To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] MI: lvalues and variable_editable In-Reply-To: <200710311458.58112.ghost@cs.msu.su> References: <18210.27153.559569.601092@kahikatea.snap.net.nz> <200710301222.03459.ghost@cs.msu.su> <18215.4053.151140.671560@kahikatea.snap.net.nz> <200710311458.58112.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 23.0.50.38 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: 2007-11/txt/msg00004.txt.bz2 > On Tuesday 30 October 2007 14:04:53 Nick Roberts wrote: > > > I believe that var->value will be NULL. > > > > Yes, that looks good. I'll use: > > > > if (!var->value || !VALUE_LVAL(var->value)) > > return 0; > > > > and that should keep us both happy. > > As long there which code *replaces* gdb_evaluate_expression, I'm > perfectly happy. Thanks! Using var->value == NULL means that variable objects of pointers that cannot be dereferenced are "noneditable". This means that such variable objects may change from being "editable" to "noneditable" during execution. This may not be a bad thing as discussion started from posts about not being able to assign values to variable objects that were described as "editable". I'll look at combining varobj_editable_p with the test in mi_cmd_var_assign: if (!varobj_set_value (var, expression)) error (_("mi_cmd_var_assign: Could not assign expression to variable object" to give one message. -- Nick http://www.inet.net.nz/~nickrob