From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30172 invoked by alias); 22 Mar 2007 23:53:47 -0000 Received: (qmail 30163 invoked by uid 22791); 22 Mar 2007 23:53:46 -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, 22 Mar 2007 23:53:42 +0000 Received: from kahikatea.snap.net.nz (187.61.255.123.dynamic.snap.net.nz [123.255.61.187]) by viper.snap.net.nz (Postfix) with ESMTP id 488F13D9E46; Fri, 23 Mar 2007 11:53:39 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 0EA394F721; Fri, 23 Mar 2007 11:53:39 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17923.5890.566302.505263@kahikatea.snap.net.nz> Date: Thu, 22 Mar 2007 23:53:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Behaviour of invalid varobjs In-Reply-To: <200703221341.00513.ghost@cs.msu.su> References: <17922.23339.685826.963727@kahikatea.snap.net.nz> <200703221341.00513.ghost@cs.msu.su> X-Mailer: VM 7.19 under Emacs 22.0.96.1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00286.txt.bz2 > > Are there any real situations where you would want to create a variable > > object of a constant? If not, then, apart from ensuring that such objects > > don't crash GDB, I don't think this is an urgent issue. > > That's testcase example. Replace **0 with "**some_pointer" and you have a > real use-case. OK, I didn't realise that. Constants and variables are treated differently: try "-var-create - * *0" and "-var-create - * *some_pointer" when some_pointer = 0x0. Going back to your original e-mail: Before I go changing code, do everybody agree that: 1. The output of -var-create should either have no "value" field at all, or value="", as is used in some other context. I prefer value="" as it would be consistent with the status quo. 2. The output of -var-update should not include anything. I agree. Also, we probably should include in_scope="false" in output of -var-create, but I'm not quite sure. I don't see why. -- Nick http://www.inet.net.nz/~nickrob