let consider a header file named foo.h
#ifndef __FOO_H__
#define __FOO_H__
#include<stdio.h>
void display(){
printf("Hello");
}
#endif
and a simple program named simple.c
#include<stdio.h>
void main(){
//instrument display() at these point to print "Hello".
printf(" World\n");
}
so how to coded in instrumentation.cpp to link that foo.h file and get that display() function for doing
getOrInsertFunction("display", false);.