aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp
diff options
context:
space:
mode:
authorCarl Love <cel@us.ibm.com>2022-11-14 16:22:11 -0500
committerCarl Love <cel@us.ibm.com>2022-11-14 16:22:11 -0500
commit24b27e5e9b6bf5a37fb39dfca151722bb801cbaa (patch)
tree697275c41e563b1bf9fb21d667bb999dd1a5b750 /gdb/testsuite/gdb.cp
parent197073104337f2d2ce8353334b4125e61b8217c5 (diff)
downloadfsf-binutils-gdb-24b27e5e9b6bf5a37fb39dfca151722bb801cbaa.zip
fsf-binutils-gdb-24b27e5e9b6bf5a37fb39dfca151722bb801cbaa.tar.gz
fsf-binutils-gdb-24b27e5e9b6bf5a37fb39dfca151722bb801cbaa.tar.bz2
PowerPC, function ppc64_sysv_abi_return_value add missing return value convention
This patch address five testcase failures in gdb.cp/non-trivial-retval.exp. The following commit resulted in the five testcases failures on PowerPC. The value returned by the function is being reported incorrectly. commit b1718fcdd1d2a5c514f8ee504ba07fb3f42b8608 Author: Andrew Burgess <aburgess@redhat.com> Date: Mon Dec 13 16:56:16 2021 +0000 gdb: on x86-64 non-trivial C++ objects are returned in memory Fixes PR gdb/28681. It was observed that after using the `finish` command an incorrect value was displayed in some cases. Specifically, this behaviour was observed on an x86-64 target. The function: enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) should return RETURN_VALUE_STRUCT_CONVENTION if the valtype->code() is TYPE_CODE_STRUCT and if the language_pass_by_reference is not trivially_copyable. This patch adds the needed code to return the value RETURN_VALUE_STRUCT_CONVENTION in this case. With this patch, the five test cases still fail but with the message "Value returned has type: A. Cannot determine contents". The PowerPC ABI stores the address of the buffer containing the function return value in register r3 on entry to the function. However, the PowerPC ABI does not guarentee that r3 will not be modified in the function. So when the function returns, the return buffer address cannot be reliably obtained from register r3. Thus the message "Cannot determine contents" is appropriate in this case.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
0 files changed, 0 insertions, 0 deletions