From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25703 invoked by alias); 30 Dec 2006 20:41:30 -0000 Received: (qmail 25693 invoked by uid 22791); 30 Dec 2006 20:41:29 -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; Sat, 30 Dec 2006 20:41:23 +0000 Received: from Debian-exim by zigzag.lvk.cs.msu.su with spam-scanned (Exim 4.50) id 1H0l16-0002iG-9D for gdb-patches@sources.redhat.com; Sat, 30 Dec 2006 23:41:20 +0300 Received: from localhost ([127.0.0.1] helo=ip6-localhost) by zigzag.lvk.cs.msu.su with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1H0l0k-0002hf-PB; Sat, 30 Dec 2006 23:40:59 +0300 From: Vladimir Prus To: Daniel Jacobowitz Subject: Re: variable objects and registers Date: Sat, 30 Dec 2006 20:41:00 -0000 User-Agent: KMail/1.9.1 Cc: Nick Roberts , gdb-patches@sources.redhat.com References: <17782.41205.881283.845357@kahikatea.snap.net.nz> <17801.58248.297377.752117@kahikatea.snap.net.nz> <20061230202601.GA25539@nevyn.them.org> In-Reply-To: <20061230202601.GA25539@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612302340.22697.ghost@cs.msu.su> 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/msg00372.txt.bz2 On Saturday 30 December 2006 23:26, Daniel Jacobowitz wrote: > On Thu, Dec 21, 2006 at 02:29:44PM +1300, Nick Roberts wrote: > > 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. > > > /* This implements the tcl command gdb_block_vars. > > * > > * Returns all variables valid in the specified block. > > > 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). > > Just a note: whatever approach we end up with for this problem, let's > not use start and end addresses to identify the blocks. In modern > compilers a block is not a contiguous range of PCs; they can overlap. I kinda assumed we'd use 'struct block *' everywhere. We'd need to be able to check if a PC is inside a block and for that we'd need the comparison with block start and end addresses. Or there's some other way to check if PC is in block? - Volodya