Hello,
The attached patch changes the return_command so that it reports the fact that it can't handle the specified return value before, rather than after, is asked to confirm that the function should return. This way the user can make a better informed decision. The three outputs below illustrate the old vs new behavior:
YESTERDAY:
(gdb) return foo1
Make fun1 return now? (y or n) y
This architecture does not support specifying a struct or union return-value.
(gdb)
TODAY:
(gdb) return foo1
Make fun1 return now? (y or n) y
This architecture does not support specifying a struct or union return-value.
#0 0x018011a4 in main () at .../structs.c:231
231 L1 = fun1();
(gdb)
TOMORROW:
(gdb) return foo1
The location at which to store the function's return value is unknown.
Make fun1 return now? (y or n) y
#0 0x018011a4 in main () at .../structs.c:231
231 L1 = fun1();
(gdb)
The rewrite also eliminates deprecated frame references and the no-longer-called function set_return_value function.
Baring comment, I'll commit this in a day or so.