From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25150 invoked by alias); 22 Mar 2007 10:32:34 -0000 Received: (qmail 25137 invoked by uid 22791); 22 Mar 2007 10:32:32 -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 10:32:25 +0000 Received: from kahikatea.snap.net.nz (105.61.255.123.dynamic.snap.net.nz [123.255.61.105]) by viper.snap.net.nz (Postfix) with ESMTP id 4E7453DA387; Thu, 22 Mar 2007 22:32:14 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id 496964F72E; Thu, 22 Mar 2007 22:32:12 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17922.23339.685826.963727@kahikatea.snap.net.nz> Date: Thu, 22 Mar 2007 10:32:00 -0000 To: Vladimir Prus Cc: gdb@sources.redhat.com Subject: Re: Behaviour of invalid varobjs In-Reply-To: References: 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/msg00267.txt.bz2 > I think current mainline does something strange > about varobjs that cannot be evaluated: > > -var-create null_ptr * **0 > ^done,name="null_ptr",numchild="0",value="0",type="int" > (gdb) > -var-update null_ptr > ^done,changelist=[{name="null_ptr",in_scope="false"}] > > First, the value of "**0" is not 0, in fact there's no value at all. > Second, given that nothing was changed between the two commands, > it's strange that 'null_ptr' is mentioned in -var-update. > > 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. > 2. The output of -var-update should not include anything. > > Also, we probably should include in_scope="false" in output of probably should not include? > -var-create, but I'm not quite sure. 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. -- Nick http://www.inet.net.nz/~nickrob