From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29707 invoked by alias); 21 Dec 2006 01:34:35 -0000 Received: (qmail 29698 invoked by uid 22791); 21 Dec 2006 01:34:35 -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; Thu, 21 Dec 2006 01:34:24 +0000 Received: from kahikatea.snap.net.nz (p202-124-125-15.snap.net.nz [202.124.125.15]) by viper.snap.net.nz (Postfix) with ESMTP id 03C553D9F5F; Thu, 21 Dec 2006 14:35:55 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id F0EBABE3D3; Thu, 21 Dec 2006 14:29:46 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17801.58248.297377.752117@kahikatea.snap.net.nz> Date: Thu, 21 Dec 2006 01:34:00 -0000 To: Vladimir Prus , gdb-patches@sources.redhat.com Subject: Re: variable objects and registers In-Reply-To: <17801.40268.835284.224413@kahikatea.snap.net.nz> References: <17782.41205.881283.845357@kahikatea.snap.net.nz> <17800.24415.300779.516967@kahikatea.snap.net.nz> <17801.40268.835284.224413@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.0.92.1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00274.txt.bz2 > > I think that we need more higher-level notification -- namely "new locals > > appeared" and either: > > - "varobj now refers to different object" > > - or have a command that creates varobjs for all variables > > in a function. > > The latter is "-stack-list-locals --make-varobjs" isn't it? Or are you > talking about variables declared within compound statements? I see now that Insight has two commands: /* This implements the tcl command gdb_get_blocks * * Returns the start and end addresses for all blocks in * the selected frame. * * Arguments: * None * Tcl Result: * A list of all valid blocks in the selected_frame. */ static int gdb_get_blocks (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) and /* This implements the tcl command gdb_block_vars. * * Returns all variables valid in the specified block. * * Arguments: * The start and end addresses which identify the block. * Tcl Result: * All variables defined in the given block. */ static int gdb_block_vars (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) gdb_block_vars only gets called if gdb_get_blocks finds a new block which then finds any variabes local to it. That way new variable objects can be added (and old ones deleted if a block has disappeared) while keeping the variable objects which are still in scope. I think we should implement these functions in MI (perhaps Apple already have). -- Nick http://www.inet.net.nz/~nickrob