From: Tom Tromey <tromey@adacore.com>
To: Ulrich Weigand via Gdb-patches <gdb-patches@sourceware.org>
Cc: "tdevries@suse.de" <tdevries@suse.de>,
"cel@us.ibm.com" <cel@us.ibm.com>,
Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
"will_schmidt@vnet.ibm.com" <will_schmidt@vnet.ibm.com>
Subject: Re: [PATCH] PowerPC, fix gdb.base/retval-large-struct.exp
Date: Tue, 07 Mar 2023 11:59:15 -0700 [thread overview]
Message-ID: <87cz5ks7zw.fsf@tromey.com> (raw)
In-Reply-To: <fedd606083102c4b3a597ee225aa4f8d9825337d.camel@de.ibm.com> (Ulrich Weigand via Gdb-patches's message of "Fri, 18 Nov 2022 16:04:53 +0000")
>>>>> "Ulrich" == Ulrich Weigand via Gdb-patches <gdb-patches@sourceware.org> writes:
Ulrich> No, it's not really powerpc specific - the same mechanism can be
Ulrich> used on many other platforms with an ABI that uses a return buffer
Ulrich> address that is not preserved. (E.g. we're currently looking into
Ulrich> enabling it on s390x.)
I am curious if it makes sense to enable for 32-bit PPC.
That is, the appended seems to help with a "large struct return" test
case we have internally, but I don't know the PPC ABI well enough to
know if it's really correct, or if it's just working by accident.
Tom
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 261ce77345e..218fb35efed 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -8249,7 +8249,11 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
ppc64_sysv_get_return_buf_addr);
}
else
- set_gdbarch_return_value (gdbarch, ppc_sysv_abi_return_value);
+ {
+ set_gdbarch_return_value (gdbarch, ppc_sysv_abi_return_value);
+ set_gdbarch_get_return_buf_addr (gdbarch,
+ ppc64_sysv_get_return_buf_addr);
+ }
/* Set lr_frame_offset. */
if (wordsize == 8)
next prev parent reply other threads:[~2023-03-07 18:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 22:11 Carl Love
2022-11-17 12:57 ` Ulrich Weigand
2022-11-17 16:18 ` Carl Love
2022-11-18 14:46 ` Tom de Vries
2022-11-18 16:04 ` Ulrich Weigand
2022-11-18 16:14 ` Carl Love
2022-11-18 16:25 ` Tom de Vries
2022-11-18 19:11 ` Carl Love
2022-11-19 6:42 ` Tom de Vries
2022-11-23 12:44 ` Ulrich Weigand
2023-03-07 18:59 ` Tom Tromey [this message]
2023-03-08 13:48 ` Ulrich Weigand
2023-03-08 15:15 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cz5ks7zw.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=cel@us.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=will_schmidt@vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).