本文整理汇总了C++中PIN_StartProgram函数的典型用法代码示例。如果您正苦于以下问题:C++ PIN_StartProgram函数的具体用法?C++ PIN_StartProgram怎么用?C++ PIN_StartProgram使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PIN_StartProgram函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(INT32 argc, CHAR **argv)
{
out = fopen("exception_monitor.out", "w");
PIN_InitSymbols();
PIN_Init(argc, argv);
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddContextChangeFunction(OnException, 0);
IMG_AddInstrumentFunction(Image, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例2: main
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
// Initialize symbol table code, needed for rtn instrumentation
PIN_InitSymbols();
// Initialize pin
PIN_Init(argc, argv);
// Register Routine to be called to instrument rtn
RTN_AddInstrumentFunction(Routine, 0);
// Register Fini to be called when the application exits
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
示例3: main
int main(INT32 argc, CHAR **argv)
{
PIN_InitLock(&Lock);
PIN_Init(argc, argv);
PIN_InitLock(&Lock);
Out.open(KnobOutputFile.Value().c_str());
PIN_AddThreadStartFunction(ThreadStart, 0);
PIN_AddThreadFiniFunction(ThreadFini, 0);
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例4: main
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
// Initialize pin
if (PIN_Init(argc, argv)) return CodeCacheStressUsage();
OutFile.open(KnobOutputFile.Value().c_str());
// Register CacheFlushedCallback to be called when the PIN flushes the code cache
CODECACHE_AddCacheFlushedFunction(CacheFlushedCallback, NULL);
// Register Fini to be called when the application exits
PIN_AddFiniFunction(Fini, 0);
ToolStartTime = clock();
// Start the program, never returns
PIN_StartProgram();
return 0;
}
示例5: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
TRACE_AddInstrumentFunction(Trace, 0);
IMG_AddInstrumentFunction(Image, 0);
if (!PIN_InterceptSignal(SIGSEGV, SegvHandler, 0))
{
fprintf (stderr, "InterceptSignal failed\n");
exit (1);
}
// Never returns
PIN_StartProgram();
return 0;
}
示例6: main
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
// Initialize symbol processing
PIN_InitSymbols();
// Initialize pin
if (PIN_Init(argc, argv) != 0)
{
return 1;
}
// Register ImageLoad to be called when an image is loaded
IMG_AddInstrumentFunction(ImageLoad, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
示例7: main
int main(INT32 argc, CHAR **argv)
{
InitLock(&lock);
out = fopen("thread_count2.out", "w");
PIN_Init(argc, argv);
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddThreadStartFunction(ThreadStart, 0);
PIN_AddThreadFiniFunction(ThreadFini, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例8: main
int main(int argc, char *argv[])
{
if( PIN_Init(argc,argv) )
{
return Usage();
}
string logfile = KnobOutputFile.Value();
log_inl.open(logfile.c_str());
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例9: main
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
// initialize memory area used to set values in ymm regs
for (int i =0; i<64; i++)
{
ymmInitVals[i] = 0xdeadbeef;
}
// Initialize pin
PIN_Init(argc, argv);
// Register Instruction to be called to instrument instructions
INS_AddInstrumentFunction(Instruction, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
示例10: main
int main(int argc, char *argv[])
{
if( PIN_Init(argc,argv) )
{
return Usage();
}
string filename = KnobOutputFile.Value();
// Do this before we activate controllers
out.open(filename.c_str());
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例11: main
int main(int argc, char **argv)
{
PIN_SetSyntaxXED();
PIN_InitSymbols();
if (PIN_Init(argc, argv)) {
return Usage();
}
outFile = fopen(outputFile.Value().c_str(), "wb+");
INS_AddInstrumentFunction(TraceInstructions, 0);
PIN_AddFiniFunction(Fini, 0);
// never returns..
PIN_StartProgram();
return 0;
}
示例12: main
int main(int argc, CHAR *argv[])
{
PIN_InitSymbols();
if( PIN_Init(argc,argv) )
{
return Usage();
}
out = new std::ofstream(KnobOutputFile.Value().c_str());
TRACE_AddInstrumentFunction(Trace, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例13: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
trace = fopen(KnobOutput.Value().c_str(), "w");
if (!trace)
{
perror("fopen");
return 1;
}
INS_AddInstrumentFunction(RewriteIns, 0);
PIN_AddFiniFunction(AtEnd, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例14: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
trace = fopen("rewritememtrace.out", "w");
if (!trace)
{
perror("fopen");
return 1;
}
TRACE_AddInstrumentFunction(Trace, 0);
PIN_AddFiniFunction(AtEnd, 0);
// Never returns
PIN_StartProgram();
return 0;
}
示例15: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
TRACE_AddInstrumentFunction(Trace, 0);
INS_AddInstrumentFunction(Ins, 0);
RTN_AddInstrumentFunction(Rtn, 0);
IMG_AddInstrumentFunction(Image, 0);
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}