[rfa:ppc64] Fix return value
Andrew Cagney
ac131313@redhat.com
Sun Sep 21 00:36:00 GMT 2003
Hello,
The attached impements PPC64 SYSV specific versions of:
use_struct_convention
extract_return_value
store_return_value
It fixes:
gdb.base/return2.exp: char value returned successfully
gdb.base/return2.exp: int value returned successfully
gdb.base/return2.exp: short value returned successfully
gdb.base/structs.exp: p fun1
gdb.base/structs.exp: p fun2
gdb.base/structs.exp: p fun3
gdb.base/structs.exp: p fun4
gdb.base/structs.exp: p fun5
gdb.base/structs.exp: p fun6
gdb.base/structs.exp: p fun7
gdb.base/structs.exp: p fun8
gdb.c++/userdef.exp: print !one
gdb.c++/userdef.exp: print -one
gdb.c++/userdef.exp: print one != two
gdb.c++/userdef.exp: print one % two
gdb.c++/userdef.exp: print one & two
gdb.c++/userdef.exp: print one && two
gdb.c++/userdef.exp: print one * two
gdb.c++/userdef.exp: print one + two
gdb.c++/userdef.exp: print one - two
gdb.c++/userdef.exp: print one / two
gdb.c++/userdef.exp: print one < two
gdb.c++/userdef.exp: print one << 31
gdb.c++/userdef.exp: print one <= two
gdb.c++/userdef.exp: print one == two
gdb.c++/userdef.exp: print one > two
gdb.c++/userdef.exp: print one >= two
gdb.c++/userdef.exp: print one >> 31
gdb.c++/userdef.exp: print one ^ two
gdb.c++/userdef.exp: print one | two
gdb.c++/userdef.exp: print one || two
gdb.c++/userdef.exp: print ~one
gdb.c++/userdef.exp: re-selected 'main' frame after inferior call
Note the way I implemented it - the above wrap a generic
ppc64_sysv_abi_return_value function and that handles all cases. I was
finding that the more traditional technique (per my ppc post) was too
error proned. Converting it to this style caused several mysterious
regressions to mysteriously disappear.
I'm thinking of proposing that this technique become the norm.
Anyway, ok to commit?
Andrew
PS: I should note that PPC64's call function code is still on life
support - it's not in a good shape at all.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20030921/ad004143/attachment.ksh>
More information about the Gdb-patches
mailing list