[Dwarf-discuss] RE: Issue 050222.1
Jim Blandy
jimb
Thu May 26 17:29:28 GMT 2005
Daniel Berlin <dberlin at dberlin.org> writes:
> On Wed, 2005-05-25 at 12:23 -0500, Jim Blandy wrote:
> > Jim Blandy <jimb at redhat.com> writes:
> > > To allow debuggers to recover the values of such variables, you'd
> > > still want the ability to say "in this address range, here's how to do
> > > it." Perhaps the variable could have a DW_AT_value_expression
> > > attribute, whose value would be a Dwarf expression (or a location
> > > list of Dwarf expressions) computing the *value* of the variable, and
> > > not its address (since it might not have one).
> >
> > Well, except that Dwarf expressions only compute address-sized things,
> > not arbitrary language values. Rats.
> >
>
> This is true of "dwarf location expressions", but you could probably
> pretty easily define a "dwarf value expressions" superset that didn't
> have restriction (technically, it would probably have made more sense to
> make value expressions the base for location expresions, since location
> expressions have more restrictions, but a little late for hat now :P)
In principle, sure. The details are going to be a mess, though,
because it'll have to match the semantics of the source language. For
example, if the value in question were a structure, the dwarf value
expression would need to actually compute the whole structure as its
value. Imagine Dwarf expressions that compute instances of C++
classes...
More information about the Dwarf-discuss
mailing list