Re: Setting Return Address

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

 



Laurent Burgy <laurent.burgy@xxxxxxxxx> writes:

> I would like to know if it's possible to instrument one function to
> execute another function after each call.
>
> What I would like to do is storing the original return address,
> rewrite it to link to this other  "after" function and finally restore
> the original return address to go back to the original execution flow.
>
> I would like something like __cyg_profile_func_exit but without giving
> the -finstrument-functions flag (the problem in this case is that I
> would have to implement a filter in the body of this function or
> annotate all my function with the no_instrument attribute...).
>
>
>
> I've looked in the builtins file but I didn't see anything...

I'm not really clear on where you want to do this.  Do you want to use a
compiler option to change the way that your code is compiled?  gcc
doesn't have anything like that today (other than
-finstrument-functions).

Ian

[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