get_call_return_value can handle RETURN_VALUE_STRUCT_CONVENTION,
because the call is completely managed by gdb. However, it does not
handle variably-sized types correctly. The simplest way to fix this
is to use value_at_non_lval, which does type resolution.
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
{