From: Andrew Cagney <cagney@gnu.org>
To: Mark Kettenis <kettenis@chello.nl>
Cc: gdb@sources.redhat.com
Subject: Re: [RFC] Struct return values
Date: Sun, 18 Jan 2004 16:31:00 -0000 [thread overview]
Message-ID: <400AB4BE.5000300@gnu.org> (raw)
In-Reply-To: <200401181519.i0IFJrvC053668@elgar.kettenis.dyndns.org>
> Date: Sat, 17 Jan 2004 14:08:45 -0500
> From: Andrew Cagney <cagney@gnu.org>
>
> Mark, BTW,
>
> How does:
> extract_returned_value_address (arch, type, caller_frame)
> look for a function name?
>
> Seems fine to me. I'll have a go at implementing this after I've
> flushed some of my pending changes. A target should only define this
> method if it has a realiable way, at every point in a called function,
> to fetch the address, isn't it?
When looking at the code I found two cases:
"return VALUE":
GDB first pops the callers frame, and second stores the return VALUE.
This means that the method will see caller's frame just after the callee
has been forceably "returned".
"finish"
GDB first finishes the function, and second extracts the return VALUE.
This again means that the method will see the caller's frame just after
the callee has returned.
So perhaphs something like:
The target should only define this method if it has a reliable way of
extracting the struct-convention return-value address using only
information obtained from the caller's frame just after the callee has
returned. [insert something about how this is impossible on most ABIs :-)]
Andrew
next prev parent reply other threads:[~2004-01-18 16:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-09 16:22 Mark Kettenis
2004-01-09 20:05 ` Andrew Cagney
2004-01-09 23:47 ` Mark Kettenis
2004-01-11 15:58 ` Andrew Cagney
2004-01-17 19:08 ` Andrew Cagney
2004-01-18 15:20 ` Mark Kettenis
2004-01-18 16:31 ` Andrew Cagney [this message]
2004-01-18 22:13 ` Mark Kettenis
2004-01-22 14:20 ` Andrew Cagney
2004-01-22 21:52 ` Mark Kettenis
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=400AB4BE.5000300@gnu.org \
--to=cagney@gnu.org \
--cc=gdb@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