From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31120 invoked by alias); 2 Nov 2007 04:23:39 -0000 Received: (qmail 31111 invoked by uid 22791); 2 Nov 2007 04:23:38 -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; Fri, 02 Nov 2007 04:23:36 +0000 Received: from kahikatea.snap.net.nz (4.60.255.123.dynamic.snap.net.nz [123.255.60.4]) by viper.snap.net.nz (Postfix) with ESMTP id 221413DA01F; Fri, 2 Nov 2007 17:23:28 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 999EB8FC6E; Fri, 2 Nov 2007 17:21:53 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18218.42464.899738.594153@kahikatea.snap.net.nz> Date: Fri, 02 Nov 2007 04:23:00 -0000 To: Daniel Jacobowitz Cc: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: [PATCH] MI: lvalues and variable_editable In-Reply-To: <20071101153955.GA20676@caradoc.them.org> References: <18210.27153.559569.601092@kahikatea.snap.net.nz> <200710311458.58112.ghost@cs.msu.su> <18217.23406.21406.920384@kahikatea.snap.net.nz> <200710312247.40840.ghost@cs.msu.su> <20071101153955.GA20676@caradoc.them.org> X-Mailer: VM 7.19 under Emacs 23.0.50.39 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/msg00016.txt.bz2 > On Wed, Oct 31, 2007 at 10:47:40PM +0300, Vladimir Prus wrote: > > I'm not sure that's possible. If you create varobj for *foo, and foo changes > > to point to inaccessible memory, then assignment to *foo will fail, but I > > don't know any mechanism in gdb that will tell you that without actually > > trying assignment. > > Yes, there is no way to be sure without trying to write. Which we > shouldn't unless the user asked us to, of course. In that case for such a varobj, var->value == NULL must indicate that the memory was inaccessible at the _last_ update, or creation, and it may no longer be inaccessible. Describing it as "noneditable" may then be a bit misleading. I'm surprised that there is "no way to be sure without trying to write". I know that 0x0 is inaccessible memory, and presumably the OS has a better idea about what is and isn't accessible. Are you saying that in some systems, for example, you could replace a RAM chip with a ROM one, and only way to know about it is by trying to write to it? -- Nick http://www.inet.net.nz/~nickrob