From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9039 invoked by alias); 6 Apr 2006 14:41:38 -0000 Received: (qmail 9031 invoked by uid 22791); 6 Apr 2006 14:41:37 -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:41:36 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FRVfv-00071H-Ct; Thu, 06 Apr 2006 10:41:31 -0400 Date: Thu, 06 Apr 2006 15:32:00 -0000 From: Daniel Jacobowitz To: Vladimir Prus Cc: Jim Ingham , GDB List Subject: Re: MI: type prefixes for values Message-ID: <20060406144131.GA26938@nevyn.them.org> Mail-Followup-To: Vladimir Prus , Jim Ingham , GDB List References: <200602171724.03824.ghost@cs.msu.su> <200604061745.16585.ghost@cs.msu.su> <20060406140126.GA26035@nevyn.them.org> <200604061831.24650.ghost@cs.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200604061831.24650.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/msg00064.txt.bz2 On Thu, Apr 06, 2006 at 06:31:24PM +0400, Vladimir Prus wrote: > > > 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? I don't know. It's an interface. Maybe it is an error for you to try to evaluate something after -var-update says it has gone out of scope. Maybe -var-evaluate-expression should report not in scope. Someone with more MI experience would have to decide. > 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? I don't know. Maybe Jim will comment. -- Daniel Jacobowitz CodeSourcery