From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3396 invoked by alias); 6 Apr 2006 14:31:45 -0000 Received: (qmail 3381 invoked by uid 22791); 6 Apr 2006 14:31:44 -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, 06 Apr 2006 14:31:42 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1FRVWH-0004Xn-7t for gdb@sources.redhat.com; Thu, 06 Apr 2006 18:31:38 +0400 Received: from zigzag.lvk.cs.msu.su ([158.250.17.23]) by zigzag.lvk.cs.msu.su with esmtp (Exim 4.50) id 1FRVW9-0004Vy-GO; Thu, 06 Apr 2006 18:31:25 +0400 From: Vladimir Prus To: Jim Ingham , GDB List Subject: Re: MI: type prefixes for values Date: Thu, 06 Apr 2006 15:05:00 -0000 User-Agent: KMail/1.7.2 References: <200602171724.03824.ghost@cs.msu.su> <200604061745.16585.ghost@cs.msu.su> <20060406140126.GA26035@nevyn.them.org> In-Reply-To: <20060406140126.GA26035@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604061831.24650.ghost@cs.msu.su> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00063.txt.bz2 On Thursday 06 April 2006 18:01, Daniel Jacobowitz wrote: > > -exec-finish > > ^running > > (gdb) > > > > *stopped,reason="function-finished",frame={addr="0x080483bd",func="main", > > (gdb) > > -var-evaluate-expression TMP > > ^done,value="10" > > (gdb) > > > > There's no indication that 'TMP' varobj belongs to the stack frame we've > > already left. This is with vanilla 6.4. > > Interesting, the check isn't on this path. I wonder if we really need > both different ways to get at the value of a variable. varobj_update > uses value_of_root, but -var-evaluate-expression uses > value_of_variable. I bet we have some redundant code here. Maybe not, > value_of_variable is only used for strings, the others work on struct > value. I don't quite understand if you're saying that the current behaviour is a bug, or not. Can you clarify? > Anyway: > > -var-update * > ^done,changelist=[{name="TMP",in_scope="false"}] > > There's your out of scope marker. Yes, this is indeed what I'm after. However, now there's reverse problem. Say I create variable object for variable 'i'. Then during stepping I enter function that also has variable 'i'. I need to detect, somehow, that 'i' varobj created earlier relates to the parent stack frame, not the current, and that I have to create new variable object. How do I do that? Using -var-update does not seem to produce this information? Am I supposed to manually keep track of frame-id where variable object was created? And if so, how do I get frame-id? - Volodya