> Hello, > > This implements the "return_value" method I proposed earlier this week. It replaces USE_STRUCT_CONVENTION, EXTRACT_RETURN_VALUE, and STORE_RETURN_VALUE. The implementation is fallout from me fixing the ppc64 return code and finding that a single "reurn_value" method lead to more robust code. > > Several things to note: > > - The doco contains a number of maintainer notes. The intent is to provide something of a rationale for the current interface. That way future changes will have a reasonable base from which to work from. They are recommended reading. > > - I've modified the "return small_struct" code so that, when an architecture doesn't implement return_value an internal_error and not an error is reported. With the introduction of return_value, it is possible to handle the "return small_struct" case so failing to do this is an a bug in GDB. I've checked in the attached, which contains one refinement over the original. The "return" code now issues a warning, and not an error, when it realises that it can't handle the value being returned. Without this, a test like: (gdb) return small_struct gets GDB (and I think the user) into a confused state. Even though the return was performed, this fact isn't reported. Contrast this old behavior: (gdb) return foo1 Make fun1 return now? (y or n) y GDB does not support specifying a struct or union return value. (gdb) with: (gdb) return foo3 Make fun3 return now? (y or n) y warning: Location of return value unknown #0 main () at /home/scratch/PENDING/2003-10-19-ppc-return-value/src/gdb/testsui te/gdb.base/structs-char.c:234 234 L4 = fun4(); (gdb) Still comming are: - a testcase - a tweak to put the warning before the question committed, Andrew