This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Setting Return Address


Hi....

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...


thanks...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]