This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: variable objects and registers

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]