From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31764 invoked by alias); 22 May 2007 20:24:53 -0000 Received: (qmail 31755 invoked by uid 22791); 22 May 2007 20:24:53 -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; Tue, 22 May 2007 20:24:44 +0000 Received: from kahikatea.snap.net.nz (147.61.255.123.dynamic.snap.net.nz [123.255.61.147]) by viper.snap.net.nz (Postfix) with ESMTP id B9CC02F4C58; Wed, 23 May 2007 08:15:49 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 45B4D8F92C; Wed, 23 May 2007 08:15:48 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18003.20339.498282.54928@kahikatea.snap.net.nz> Date: Tue, 22 May 2007 20:24:00 -0000 To: "Marc Gauthier" Cc: "Ross Morley" , "Daniel Jacobowitz" , "Maxim Grigoriev" , , "Pete MacLiesh" Subject: RE: Understanding GDB frames In-Reply-To: References: <4652AC74.9050100@tensilica.com> X-Mailer: VM 7.19 under Emacs 22.1.50.258 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-05/txt/msg00119.txt.bz2 > It seems at the MI interface one wants a choice of whether a varobj > is associated with: > (a) a specific frame (goes away when function returns) > (b) a function > (c) a function at the same depth (which some implement) GDB already does something like (b) if you use: -var-create - @ myvar although it's not documented. I think this can specifically be used in the case of recursion > How the distinction is made at the GUI level is a separate question. > And what to do in the event of recursion when one selected a > function-level varobj (b) is also an interesting question -- perhaps > it always refers to the topmost instance (or to theseparately selected > instance if the currently selected stack depth is to that function). > > That way, (b) and (c) have less performance impact, and one of them > could be the default. And (a) being optional, could be fully supported > like watchpoints by setting a breakpoint at the return PC, even though > it has a performance hit (especially in the presence of recursion). > > And perhaps MI docs could even document this ;-) If you want this functionality in GDB then I think you will have to contribute it. -- Nick http://www.inet.net.nz/~nickrob