Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope

Andrew Cagney
2004-03-09T22:32:44Z

>>Yes, the inner "i" should be in scope. That line, which hasn't yet been
>>> executed, will destory the inner block. I think that is covered by the
>>> GCC-O0 rule?
>
>
> If that's right, it sounds like we should be using the address-in-block
> hack to figure out what local variables are in scope for the top
> frame. But that runs the risk of, for instance, moving us back into a
> preceeding function.

Er, that sounds like a theoretical address-in-block bug? The value
returned should be floored by (as in can't be less than) the function
start. Can you think of an edge case that makes this real?

Andrew