From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27738 invoked by alias); 22 Mar 2007 10:41:51 -0000 Received: (qmail 27724 invoked by uid 22791); 22 Mar 2007 10:41:51 -0000 X-Spam-Check-By: sourceware.org Received: from zigzag.lvk.cs.msu.su (HELO zigzag.lvk.cs.msu.su) (158.250.17.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 22 Mar 2007 10:41:45 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1HUKjh-0007EJ-JM for gdb@sources.redhat.com; Thu, 22 Mar 2007 13:41:42 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1HUKjS-0007De-9v; Thu, 22 Mar 2007 13:41:22 +0300 From: Vladimir Prus To: Nick Roberts Subject: Re: Behaviour of invalid varobjs Date: Thu, 22 Mar 2007 10:41:00 -0000 User-Agent: KMail/1.9.1 Cc: gdb@sources.redhat.com References: <17922.23339.685826.963727@kahikatea.snap.net.nz> In-Reply-To: <17922.23339.685826.963727@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703221341.00513.ghost@cs.msu.su> 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/msg00268.txt.bz2 On Thursday 22 March 2007 13:32, Nick Roberts wrote: > > 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. That's testcase example. Replace **0 with "**some_pointer" and you have a real use-case. - Volodya