本文整理汇总了C++中PIN_Init函数的典型用法代码示例。如果您正苦于以下问题:C++ PIN_Init函数的具体用法?C++ PIN_Init怎么用?C++ PIN_Init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PIN_Init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
PIN_Init(argc, argv);
out.open(KnobOutput.Value().c_str());
INS_AddInstrumentFunction(InstrumentInstruction, 0);
// Fini prints the results.
PIN_AddFiniFunction(Fini, 0);
PIN_AddThreadStartFunction(CheckThreadCount, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:17,代码来源:checkinline.cpp
示例2: main
int main(int argc, char * argv[])
{
PIN_Init(argc, argv);
PIN_InitSymbols();
#if defined(TARGET_LINUX) || defined(TARGET_BSD)
LimitAvailableSpace();
#endif
out = fopen(KnobOutputFile.Value().c_str(), "w");
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:asudhak,项目名称:peachfuzz-code,代码行数:17,代码来源:memalloc.cpp
示例3: main
int main(int argc, char * argv[])
{
// Initialize symbol processing
PIN_InitSymbols();
// Initialize pin
if (PIN_Init(argc, argv)) return Usage();
logging = ! KnobReplay.Value();
if (logging)
{
trace = fopen("record_imageload_rec.out", "w");
imgLog = fopen("imageload.log", "w");
IMG_AddInstrumentFunction(LogImageLoad, 0);
IMG_AddUnloadFunction (LogImageUnload, 0);
}
else
{ // Replaying
trace = fopen("record_imageload_play.out", "w");
imgLog = fopen("imageload.log", "r");
// We will handle image load operations.
PIN_SetReplayMode (REPLAY_MODE_IMAGEOPS);
// And then we replay the first two image load ops before we start the program.
// We do this even before adding the image instrumentation callback, that should still work,
// Pin should defer these and replay them inside PIN_StartProgram.
ReplayImageEntry();
ReplayImageEntry();
INS_AddInstrumentFunction (InstrumentInstruction, 0);
}
// These Trace functions demonstrate that the events are happening, they are the client...
IMG_AddInstrumentFunction(TraceImageLoad, 0);
IMG_AddUnloadFunction (TraceImageUnload, 0);
// Register Fini to be called when the application exits
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:asudhak,项目名称:peachfuzz-code,代码行数:46,代码来源:record_imageload.cpp
示例4: main
int main(INT32 argc, CHAR **argv)
{
PIN_InitLock(&Lock);
PIN_Init(argc, argv);
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;
}
开发者ID:herjmoo,项目名称:research,代码行数:17,代码来源:reg_inst_gx.cpp
示例5: main
int main(int argc, char *argv[])
{
PIN_InitSymbols();
if(PIN_Init(argc, argv)){
return Usage();
}
PIN_SetSyntaxIntel();
IMG_AddInstrumentFunction(Image, 0);
INS_AddInstrumentFunction(Instruction, 0);
#ifdef DEBUG
PIN_AddFiniFunction(Fini, 0);
#endif
PIN_StartProgram();
return 0;
}
开发者ID:Debug-Orz,项目名称:PinTools,代码行数:17,代码来源:OverflowDetection.cpp
示例6: main
int main(int argc, char * argv[])
{
// We accumlate counts into a register, make sure it is 64 bits to
// avoid overflow
ASSERTX(sizeof(ADDRINT) == sizeof(UINT64));
PIN_Init(argc, argv);
PIN_AddThreadStartFunction(ThreadStart, 0);
PIN_AddThreadFiniFunction(ThreadFini, 0);
PIN_AddFiniFunction(Fini, 0);
TRACE_AddInstrumentFunction(Trace, 0);
PIN_StartProgram();
return 0;
}
开发者ID:dcashman,项目名称:Coursework,代码行数:17,代码来源:inscount2_vregs.cpp
示例7: main
int main(int argc, char * argv[])
{
PIN_Init(argc, argv);
char *ld_preload = getenv("LD_PRELOAD");
if (ld_preload != 0)
{
printf("check_env_tool ERROR: LD_PRELOAD should not be a part of Pin environment");
exit(-1);
}
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:asudhak,项目名称:peachfuzz-code,代码行数:17,代码来源:check_env.cpp
示例8: main
int main(int argc, char *argv[])
{
PIN_InitSymbols();
if( PIN_Init(argc,argv) )
{
return 1;
}
INS_AddInstrumentFunction(InstrumentInstruction, 0);
IMG_AddInstrumentFunction(Image, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:17,代码来源:rep_ip_at_ipoint_after_tool.cpp
示例9: main
int main(int argc, char *argv[])
{
if (PIN_Init(argc, argv)) return Usage();
trace = fopen("strace.out", "w");
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddSyscallEntryFunction(SyscallEntry, 0);
PIN_AddSyscallExitFunction(SyscallExit, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:17,代码来源:strace.cpp
示例10: main
int
main(int argc, char** argv)
{
if (PIN_Init(argc, argv))
{
usage();
return 1;
}
align_check.Activate();
// Never returns
PIN_StartProgram();
// NOTREACHED
return 0;
}
开发者ID:gungun1010,项目名称:hidden,代码行数:17,代码来源:alignchk.cpp
示例11: main
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
// Initialize pin
PIN_Init(argc, argv);
// Register InstrumentTrace function
TRACE_AddInstrumentFunction(InstrumentTrace, 0);
// Register application exit call back
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:andrewjinyounglee,项目名称:PerVERT,代码行数:18,代码来源:smc_check.cpp
示例12: main
int main(int argc, char *argv[])
{
PIN_Init(argc, argv);
PIN_InitSymbols();
IMG_AddInstrumentFunction(ImageLoad, 0);
TRACE_AddInstrumentFunction(Trace, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:17,代码来源:test_iarg_preserve.cpp
示例13: main
int main(int argc, char * argv[])
{
PIN_Init(argc, argv);
Out.open(KnobOutfile.Value().c_str());
if (!Out.good())
{
std::cerr << "Unable to open '" << KnobOutfile.Value() << "'" << std::endl;
return 1;
}
INS_AddInstrumentFunction(InstrumentIndirects, 0);
PIN_AddFiniFunction(Fini, 0);
PIN_StartProgram();
return 0;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:17,代码来源:context-pc.cpp
示例14: main
int main(INT32 argc, CHAR **argv)
{
InitLock(&lock);
out = fopen("thread_count.out", "w");
PIN_Init(argc, argv);
PIN_AddThreadStartFunction(ThreadStart, 0);
PIN_AddThreadFiniFunction(ThreadFini, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:sarachour,项目名称:siact,代码行数:17,代码来源:thread_count.cpp
示例15: main
int main(int argc, char * argv[])
{
if (PIN_Init(argc, argv)) return Usage();
// Create a Profiler Object
Profiler *prof = new Profiler();
// Passing profiler object to the instrumentation function
INS_AddInstrumentFunction(Instruction, prof);
// Passing profiler object to the finish function
PIN_AddFiniFunction(Fini, prof);
PIN_StartProgram();
return 0;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:17,代码来源:insprofiler.cpp
示例16: main
// argc, argv are the entire command line, including pin -t <toolname> -- ...
int main(int argc, char * argv[])
{
PIN_InitSymbols();
// Initialize pin
PIN_Init(argc, argv);
// Register ImageLoad to be called when an image is loaded
IMG_AddInstrumentFunction(ImageLoad, 0);
// Register ImageUnload to be called when an image is unloaded
IMG_AddUnloadFunction(ImageUnload, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:andrewjinyounglee,项目名称:PerVERT,代码行数:19,代码来源:dlclose.cpp
示例17: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
// Scratch register used to select
// instrumentation version.
version_reg = PIN_ClaimToolRegister();
TRACE_AddInstrumentFunction(Trace, 0);
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:EmilyBragg,项目名称:profiling-tool,代码行数:18,代码来源:special_case1.cpp
示例18: main
int main(int argc, char * argv[])
{
trace = fopen("isampling.out", "w");
// Initialize pin
if (PIN_Init(argc, argv)) return Usage();
// Register Instruction to be called to instrument instructions
INS_AddInstrumentFunction(Instruction, 0);
// Register Fini to be called when the application exits
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:18,代码来源:isampling.cpp
示例19: main
int __cdecl main(int argc, char *argv[]){
PIN_InitSymbols();
if (PIN_Init(argc, argv)) return 1;
InitLock(&lock);
pcounter = (unsigned char *)log_init();
TRACE_AddInstrumentFunction(Trace, 0);
IMG_AddInstrumentFunction(Image, 0);
IMG_AddUnloadFunction(ImageUnload, 0);
PIN_AddContextChangeFunction(ContextChange, 0);
PIN_AddFiniFunction(ExitFunction, 0);
PIN_StartProgram();
return 0;
}
开发者ID:IDA-RE-things,项目名称:IDA-pinlog,代码行数:18,代码来源:main.cpp
示例20: main
int main(int argc, char * argv[])
{
// initialize memory area used to set values in xmm regss
for (int i =0; i<64; i++)
{
xmmInitVals[i] = 0xdeadbeef;
}
PIN_Init(argc, argv);
outfile = fopen("xmmt.out", "w");
INS_AddInstrumentFunction(Instruction, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:18,代码来源:xmmtest.cpp
注:本文中的PIN_Init函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论