Andy, you must handle the calling convertion when inserting a function call. It includes the saving and restoring of caller registers and the proper passing of params.
On 2/9/07, Andrew Haley <[EMAIL PROTECTED]> wrote:
�NbjX writes: > > > > Make sure that the called function restores the original state of the > > program before it returns. > > > > Andreas. > Thanks~. I know the goal is to restore the original state before the > inserted function returns. BUT, how to? Is there any way to tell gcc: > "Hey, you should restore the original state before that function > returns". I want hints on how to and the existing interfaces in gcc > to do this :-). He's telling you that you have to do it yourself, in the code that you just inserted. Andrew.
-- Paul Yuan www.yingbo.com