This is the mail archive of the
mailing list for the GDB project.
Re: DWARF3 DW_OP_push_object_address - requirement for deferred evaluation?
On Tue, Mar 06, 2007 at 04:11:29PM -0800, Gary Funck wrote:
> Still, I was a bit confused by the code in add_partial_symbol(), which
> checks to see if the symbol is external, and in that case seems to
> assume that the location description is "simple" and can be computed
> by decode_locdesc(), which evaluates to a fixed CORE_ADDR. If this
> global variable in fact is allocated at runtime and its data and
> size are described by a dope vector, then this assumption will not
> hold? Is this one of those places that you were referring to
> when you said that GDB sometimes pushes the object's address?
No, it's an entirely different sort of problem. I think you'll be in
some difficulty with globals with computed addresses, though I'm not
sure how that would arise needing DW_OP_push_object_address.
Normally, it only occurs today for local variables...
I think there is some case where we evaluate simple location
descriptions relative to the object address, but shouldn't. However,
I do not remember the details.