This is the mail archive of the
mailing list for the GCC project.
- From: Niklaus <niklaus at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 16 Feb 2015 03:30:26 +0530
- Subject: mfentry example
- Authentication-results: sourceware.org; auth=none
I'm trying to do a live update of a function without killing or
stopping the program. This is a single threaded application which runs
something similar to the below code. Maximum time is spent in the
What i want to do is compile with gcc-4.8 with -pg and -mfentry and
then call function g() and then do the int y=x*3 and everything else.
I have thought of an idea about registering a sigHandler and then
setjmp/longjmp to g.. Please note i'm trying to fix some bugs here
without stopping the process.
I want to do something akin to Kgraft/Kpatch or Erlang's dynamic
Can you please help me by throwing some light on this .
void g(int x)
new code that fixes some bugs
void f(int x)
printf("y on entry is 9\n");
printf("i now is %d\n",i);