[0/2] PowerPC, fix support for printing the function return value for non-trivial values.

Message ID dc0c7152569226a2db68d31706ebc57b8c1426e9.camel@us.ibm.com
Headers
Series PowerPC, fix support for printing the function return value for non-trivial values. |

Message

Carl Love Oct. 6, 2022, 4:36 p.m. UTC
  GDB maintainers:

This patch set addresses the five test failures in gdb.cp/non-trivial-
retval.exp on PowerPC.  

The failures started with

   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 return value from the function is not correct due to multiple
problems.  

The PowerPC specific code does not return the correct return value
convention.  This is fixed by the first patach.  However due to the
PowerPC ABI, GDB is still not able to reliably determine the function
return value.

The second patch addresses the issue of not being able to reliably
determine the return buffer address on PowerPC.  The patch adds a new
GDB ABI to use the DW_OP_entryvalue for the DWARF entries to reliably
obtain the return buffer address stored in register r3 on entry to the
function.

These two patches fix the five testsuite failures in gdb.cp/non-
trivial-retval.exp on PowerPC.

                      Carl Love