From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15993 invoked by alias); 6 Apr 2006 14:01:31 -0000 Received: (qmail 15985 invoked by uid 22791); 6 Apr 2006 14:01:31 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 06 Apr 2006 14:01:30 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FRV38-0006nz-Nn; Thu, 06 Apr 2006 10:01:26 -0400 Date: Thu, 06 Apr 2006 14:31:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: Jim Ingham , GDB List Subject: Re: MI: type prefixes for values Message-ID: <20060406140126.GA26035@nevyn.them.org> Mail-Followup-To: Vladimir Prus , Jim Ingham , GDB List References: <200602171724.03824.ghost@cs.msu.su> <200604061703.26246.ghost@cs.msu.su> <20060406133546.GB25088@nevyn.them.org> <200604061745.16585.ghost@cs.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604061745.16585.ghost@cs.msu.su> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes 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/msg00061.txt.bz2 On Thu, Apr 06, 2006 at 05:45:16PM +0400, Vladimir Prus wrote: > > Either b's stack frame is at the same address - in which case the > > varobj is still valid - or else it isn't, in which case the frame id > > has changed. > > I did not know that GDB exposes frame ID in any way, and Jim has mentioned > that it's XCode that does the magic, not gdb. Is there some command to print > frame id that I've missed? There shouldn't be, but GDB will notice if the varobj has gone invalid. > -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. Anyway: -var-update * ^done,changelist=[{name="TMP",in_scope="false"}] There's your out of scope marker. -- Daniel Jacobowitz CodeSourcery