This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Code Instrumentation
- From: "Wolfgang" <wolfgang8081 at gmx dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 31 May 2010 11:10:56 +0200
- Subject: Code Instrumentation
Hallo,
i would like to instrument some existing code. For example, after an ADD-EXPR:
int main() {
int a=5;
int b=5;
int c = a + b; ...
}
should become:
...
int c = a + b;
puts("ADD-EXPR");
...
I thought writing a Gimple-pass would be best, but i don't know exactly where to start. I'm able to walk throug the Gimple-Statements and debug it, but i'm not able to insert something.
Is there any source-code available?
Thanks
Wolfgang
--
GRATIS fÃr alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01