Re: return address in __cyg_profile_func_exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux