示例#1
0
VOID Restart(ADDRINT insAddress, CONTEXT * ctxt, ADDRINT traceAddress)
{
    // This instruction requires swizzling
    SwizzleRefs.insert(insAddress);
    
    //fprintf(stderr,"Remove trace at address %p\n",(void*)traceAddress);
    CODECACHE_InvalidateTraceAtProgramAddress(traceAddress);

    //fprintf(stderr,"Restart %p\n",(void*)insAddress);
    PIN_ExecuteAt(ctxt);
}
示例#2
0
// This function is called before every trace is executed
VOID DoSmcCheck(VOID * traceAddr,
                VOID * traceCopyAddr,
                USIZE traceSize,
                CONTEXT * ctxP)
{
    if (memcmp(traceAddr, traceCopyAddr, traceSize) != 0)
    {
        smcCount++;
        free(traceCopyAddr);
        CODECACHE_InvalidateTraceAtProgramAddress((ADDRINT)traceAddr);
        PIN_ExecuteAt(ctxP);
    }
}