+ if (p->location == DWARF_VALUE_LITERAL)
+ {
+ p->v.literal.data = ctx->data;
+ p->v.literal.length = ctx->len;
+ }
+ else if (dwarf_expr_stack_empty_p (ctx))
+ {
+ p->location = DWARF_VALUE_OPTIMIZED_OUT;
+ /* Also reset the context's location, for our callers. This is
+ a somewhat strange approach, but this lets us avoid setting
+ the location to DWARF_VALUE_MEMORY in all the individual
+ cases in the evaluator. */
+ ctx->location = DWARF_VALUE_OPTIMIZED_OUT;
+ }
+ else
+ {
+ p->v.expr.value = dwarf_expr_fetch (ctx, 0);
+ p->v.expr.in_stack_memory = dwarf_expr_fetch_in_stack_memory (ctx, 0);
+ }