AdaCore has a local patch for PPC "finish", but last year, Ulrich
Weigand pointed out that this patch was incorrect. It may work for
simple functions like the one in the internal test, but nothing
guarantees that r3 will be preserved by the callee, so checking r3 on
exit is not always correct.
This patch fixes the problem using the same approach as PPC64: use the
entry value of r3, if available. Ulrich confirmed this matches the
PPC32 ABI.
}
CORE_ADDR
-ppc64_sysv_get_return_buf_addr (struct type *val_type,
- frame_info_ptr cur_frame)
+ppc_sysv_get_return_buf_addr (struct type *val_type, frame_info_ptr cur_frame)
{
/* The PowerPC ABI specifies aggregates that are not returned by value
are returned in a storage buffer provided by the caller. The
const struct regcache *regcache,
int regnum, void *vsxregs, size_t len);
-extern CORE_ADDR ppc64_sysv_get_return_buf_addr (type*, frame_info_ptr);
+/* Implementation of the gdbarch get_return_buf_addr hook. */
+
+extern CORE_ADDR ppc_sysv_get_return_buf_addr (type*, frame_info_ptr);
/* Private data that this module attaches to struct gdbarch. */
if (wordsize == 8)
{
set_gdbarch_return_value (gdbarch, ppc64_sysv_abi_return_value);
- set_gdbarch_get_return_buf_addr (gdbarch,
- ppc64_sysv_get_return_buf_addr);
set_gdbarch_update_call_site_pc (gdbarch, ppc64_update_call_site_pc);
}
else
set_gdbarch_return_value (gdbarch, ppc_sysv_abi_return_value);
+ set_gdbarch_get_return_buf_addr (gdbarch, ppc_sysv_get_return_buf_addr);
/* Set lr_frame_offset. */
if (wordsize == 8)