This is the mail archive of the gdb@sourceware.org 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: Symbols/blocks questions


On Saturday 19 September 2009 Joel Brobecker wrote:

> > 1. Given 'struct block *b', is it true that
> > 
> >     block_for_pc (b.startaddr) == b
> 
> My guess is that this is NOT true. Two blocks could have the same
> start address if one block is nested inside the other...

Then, it's probably likewise not true for any other random address
in block. And then, the only reliable way to identify a block is via
its address.

What I'm trying to do is make -stack-list-variables output block
together with a name of variable, and make -var-create accept
some block specification. This, together, should all to display
shadowed variables in frontend. Looks like 'block' should be
the string rendition of the address of struct block :-/

- Volodya


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