push_thread_stack_temporary (thr, retval);
}
else
- {
- retval = allocate_value (ri->value_type);
- read_value_memory (retval, 0, 1, ri->struct_addr,
- value_contents_raw (retval).data (),
- ri->value_type->length ());
- }
+ retval = value_at_non_lval (ri->value_type, ri->struct_addr);
}
else
{
- retval = allocate_value (ri->value_type);
- gdbarch_return_value (ri->gdbarch, ri->function, ri->value_type,
- get_current_regcache (),
- value_contents_raw (retval).data (), NULL);
+ gdbarch_return_value_as_value (ri->gdbarch, ri->function, ri->value_type,
+ get_current_regcache (),
+ &retval, NULL);
if (stack_temporaries && class_or_union_p (ri->value_type))
{
/* Values of class type returned in registers are copied onto
bool stack_temporaries = thread_stack_temporaries_enabled_p (call_thread.get ());
frame = get_current_frame ();
+ frame.prepare_reinflate ();
gdbarch = get_frame_arch (frame);
if (!gdbarch_push_dummy_call_p (gdbarch))
"target calling convention."),
get_function_name (funaddr, name_buf, sizeof (name_buf)));
+ frame.reinflate ();
+
if (values_type == NULL || values_type->is_stub ())
values_type = default_return_type;
if (values_type == NULL)