From: Andrew Haley <aph@redhat.com>
To: Laurent Burgy <laurent.burgy@gmail.com>
Cc: gcc-help@gnu.org
Subject: Re: return address in __cyg_profile_func_exit
Date: Wed, 08 Apr 2009 15:23:00 -0000 [thread overview]
Message-ID: <49DCC138.6040404@redhat.com> (raw)
In-Reply-To: <e625a54d0904080758j23264deahaf2aa9f8d18d8822@mail.gmail.com>
Laurent Burgy wrote:
> I've been unable to find a high-level way of getting the original
> return address of a function when entering __cyg_profile_func_exit.
>
> __cyg_profile_func_exit is executed at the end of a function, is there
> any way (with a builting) to retrieve the original returned value.
> That would enable me to investigate the returned values without
> modifying the calling site. The information must be somewhere but I
> don't know how to reach it. (Getting EBX is not an option that I
> consider since the value may depend on the level of optimization -i've
> seen it only works with -O0).
The return value is in EAX, but it isn't there when __cyg_profile_func_exit
is called. It'd be quite easy to modify the compiler to do this, and not
possible otherwise.
Andrew.
prev parent reply other threads:[~2009-04-08 15:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 14:58 Laurent Burgy
2009-04-08 15:23 ` Andrew Haley [this message]
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=49DCC138.6040404@redhat.com \
--to=aph@redhat.com \
--cc=gcc-help@gnu.org \
--cc=laurent.burgy@gmail.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).