On Thu, Jul 14, 2016 at 11:36:06AM -0400, Trevor Harrison wrote:
> Hi,
> I'm trying to evaluate DWARF expressions and I'm looking for a hint
> or some documentation about the state of the expression evaluator's
> stack prior to beginning the expression.
>
> The reason I'm asking about this is I'm seeing expressions (a
> DW_AT_data_member_location for example) that start with DW_OP_dup,
> which implies that there is something on the stack for it to dup.
Of course there is, just read e.g. in DWARF4 p. 87 in the first paragraph:
"Otherwise, the value must be a location description. In this latter case,
the beginning address of the derived class is pushed on the expression stack
before the location description is evaluated and the result of the evaluation
is the location of the inherited type."
Similarly on p. 88.
Jakub
___
Dwarf-Discuss mailing list
Dwarf-Discuss@lists.dwarfstd.org
http://lists.dwarfstd.org/listinfo.cgi/dwarf-discuss-dwarfstd.org