]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Use entry values for 32-bit PPC struct return
authorTom Tromey <tromey@adacore.com>
Tue, 21 Feb 2023 20:49:17 +0000 (13:49 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 21 Apr 2023 13:14:24 +0000 (07:14 -0600)
commitfbdecfbf285234cd4eba0e7daf480c63b2d65eb3
tree6d2957e6736f42e49332474bc95d7177d9bbfc18
parent9df25c346f5517c0228d067c68ee2f6bfe1728ad
Use entry values for 32-bit PPC struct return

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.
gdb/ppc-sysv-tdep.c
gdb/ppc-tdep.h
gdb/rs6000-tdep.c