From: Andrew Cagney <cagney@gnu.org>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH/RFC/RFA] Print in-memory struct return values
Date: Sun, 09 May 2004 13:59:00 -0000 [thread overview]
Message-ID: <409D765B.2030209@gnu.org> (raw)
In-Reply-To: <200405082302.i48N2Jif026166@elgar.kettenis.dyndns.org>
Date: Sat, 08 May 2004 17:12:21 -0400
From: Andrew Cagney <cagney@gnu.org>
> Ouch. That's really ugly. I thought RETURN_VALUE_STRUCT_CONVENTION
> was already long enough. I'd really like to avoid thos really long
> names. Hmm what if I use:
>
> RETURN_VALUE_ABI_RETURNS_ADDRESS
> RETURN_VALUE_ABI_PRESERVES_ADDRESS
yes.
So I checked in the attached. The patches also corners
RETURN_VALUE_ABI_PRESERVES_ADDRESS, but doesn't implement it yet.
I'll do that when I touch SPARC again.
The patch induces some PASS->KFAIL changes in the testsuite. This is
actually a problem with the testsuite. The tests in question assume
that if "finish" prints a return value, "return" should work.
RETURN_VALUE_ABI_RETURNS_ADDRESS makes this assumption invalid. We
should probably just remove those tests, but perhaps we can do
something smarter.
How come it doesn't work?
Popping the caller's frame should (assuming the unwind info is correct)
restore the struct-return address register to the value that the callee
expects. return_value can then use that register value to find the
location at which to store the struct?
That cross check is there because, in the past, people decided getting
all these edge cases right was too hard and ignored them. If the
previous paragraph doesn't hold, something smarter is needed.
Andrew
next prev parent reply other threads:[~2004-05-09 13:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 17:07 Mark Kettenis
2004-05-07 22:35 ` Andrew Cagney
2004-05-07 23:10 ` Mark Kettenis
2004-05-08 19:58 ` Mark Kettenis
2004-05-12 17:47 ` Michael Snyder
2004-05-15 21:26 ` Mark Kettenis
2004-05-15 22:12 ` Andreas Schwab
2004-05-16 10:28 ` Mark Kettenis
[not found] ` <200405081958.i48JwlUU000353@elgar.kettenis.dyndns.org>
[not found] ` <409D4216.4050401@gnu.org>
[not found] ` <200405082101.i48L1NUK000503@elgar.kettenis.dyndns.org>
2004-05-08 21:14 ` Andrew Cagney
2004-05-08 23:02 ` Mark Kettenis
2004-05-09 13:59 ` Andrew Cagney [this message]
2004-05-09 14:03 ` Mark Kettenis
2004-05-11 23:53 ` Andrew Cagney
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=409D765B.2030209@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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