Re: Symbols/blocks questions

Vladimir Prus
2009-09-19T16:41:14Z

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