Re: Symbols/blocks questions

Vladimir Prus
2009-09-19T18:35:39Z

On Saturday 19 September 2009 Joel Brobecker wrote:

> > 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.
>
> I think that's correct. We have routines IIRC that locate the innermost
> block for a PC, or something like that, but I don't think we identify
> blocks by their start 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
> ^^^allow ?
> > shadowed variables in frontend. Looks like 'block' should be
> > the string rendition of the address of struct block :-/
>
> Depending on the language, lexical blocks can be named, and it looks
> like DWARF supports that, so I suppose you could you that. But blocks
> can definitely be annonymous too, in which case the "string rendition"
> might be a challenge...

Well, string rendition is not really a challenge. You take
struct block *, and then use phex :-) The id need not be
stable across debug sessions, it just should be stable within
one debug session.

- Volodya

>
>