I have this global variable in my pintool and i want to get its content inside Instruction (my instrumentation function).
UINT32 windowCnt=0;
LOCALFUN VOID Instruction(INS ins, VOID *v)
{
const AFUNPTR InsRefFun = ((wcount % 2)==0 ? (AFUNPTR) InsRef_Skip : (AFUNPTR) InsRef);
INS_InsertIfCall(
ins, IPOINT_BEFORE, (AFUNPTR)InsRefFun,
IARG_THREAD_ID,
IARG_INST_PTR,
IARG_END);
...
}
How can i do this? I've tried GLOBALVAR, LOCALVAR, const and static but nothing gave me back the correct value.