+ if (gdbarch_return_value_p (current_gdbarch))
+ {
+ switch (gdbarch_return_value (current_gdbarch, type, NULL, NULL, NULL))
+ {
+ case RETURN_VALUE_REGISTER_CONVENTION:
+ /* Success. The architecture can deal with it, write it to
+ the regcache. */
+ gdbarch_return_value (current_gdbarch, type, current_regcache,
+ VALUE_CONTENTS (val), NULL);
+ return;
+ case RETURN_VALUE_STRUCT_CONVENTION:
+ /* Failure. For the moment, assume that it is not possible
+ to find the location, on the stack, at which the "struct
+ return" value should be stored. Only a warning because
+ an error aborts the "return" command leaving GDB in a
+ weird state. */
+ warning ("Location of return value unknown");
+ return;
+ }
+ }
+
+