本文整理汇总了C++中PIN_AddFiniFunction函数的典型用法代码示例。如果您正苦于以下问题:C++ PIN_AddFiniFunction函数的具体用法?C++ PIN_AddFiniFunction怎么用?C++ PIN_AddFiniFunction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PIN_AddFiniFunction函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
PIN_Init(argc, argv);
PIN_AddThreadStartFunction(ThreadStart, 0);
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:asudhak,项目名称:peachfuzz-code,代码行数:13,代码来源:segmented_ea_verifier.cpp
示例2: main
int main(int argc, char * argv[])
{
PIN_Init(argc, argv);
out = new ofstream("nops.out");
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:13,代码来源:nops.cpp
示例3: main
int main(INT32 argc, CHAR **argv)
{
PIN_InitSymbols();
PIN_Init(argc, argv);
RTN_AddInstrumentFunction(Rtn, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:asudhak,项目名称:peachfuzz-code,代码行数:13,代码来源:insMix.cpp
示例4: STool_Run
// -------------------------------------------------------------
// Tool startup function
// -------------------------------------------------------------
void STool_Run(STool_TSetup* s) {
// make setup configuration globally available
gSetup = *s;
// extract application (path)name and full application command line
for (int i=0; i<gSetup.argc-1;)
if (!strcmp("--", gSetup.argv[i++])) {
int len = 0, j;
for (j=i; j<gSetup.argc; ++j) len += strlen(gSetup.argv[j])+1;
gAppName = gSetup.argv[i];
gCommandLine = (char*)calloc(len, 1);
if (gCommandLine == NULL) exit((printf("Can't allocate command line string\n"),1));
strcat(gCommandLine, gSetup.argv[i]);
for (j=i+1; j<gSetup.argc; ++j) {
strcat(gCommandLine, " ");
strcat(gCommandLine, gSetup.argv[j]);
}
}
// initialize symbol table code, needed for rtn instrumentation
PIN_InitSymbols();
// initialize pin
if (PIN_Init(gSetup.argc, gSetup.argv)) {
Usage();
return;
}
// obtain a key for TLS storage.
gTlsKey = PIN_CreateThreadDataKey(0);
// if using memory operations buffering, define a BUF_SIZE-pages trace buffer
// and register BufferOverflow to be called when the buffer fills up
if (gSetup.memBuf) buf_id = PIN_DefineTraceBuffer(sizeof(STool_TMemRec), BUF_SIZE, BufferOverflow, 0);
// register ThreadStart to be called when a thread starts
PIN_AddThreadStartFunction(ThreadStart, 0);
// register ThreadEnd to be called when a thread ends
PIN_AddThreadFiniFunction(ThreadEnd, 0);
// register I_Trace to be called to instrument traces
TRACE_AddInstrumentFunction(I_Trace, 0);
// register Fini to be called when application exits
if (gSetup.appEnd) PIN_AddFiniFunction(Fini, 0);
// start the program, never returns
PIN_StartProgram();
}
开发者ID:chubbymaggie,项目名称:hcct,代码行数:54,代码来源:STool_PIN.cpp
示例5: main
int main( int argc, char **argv )
{
PIN_InitSymbols();
if ( PIN_Init(argc, argv) )
return Usage();
LogFile = fopen( KnobOutputFile.Value().c_str(), "wb" );
IMG_AddInstrumentFunction( ImageLoad, NULL );
PIN_AddFiniFunction( Finish, NULL );
PIN_StartProgram();
return 0;
}
开发者ID:idkwim,项目名称:NetLogger,代码行数:14,代码来源:NetLogger.cpp
示例6: main
int main(int argc, char *argv[])
{
if (PIN_Init(argc, argv)) return Usage();
trace = fopen("pinatrace.out", "w");
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:azizulhakim,项目名称:atomicuserspace,代码行数:14,代码来源:pinatrace_old.cpp
示例7: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
INS_AddInstrumentFunction(Instruction, 0);
IMG_AddInstrumentFunction(ImageLoad, 0);
// Register Fini to be called when the application exits
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:sarachour,项目名称:siact,代码行数:14,代码来源:img_find_by_addr.cpp
示例8: main
int main(int argc, char * argv[])
{
PIN_Init(argc, argv);
PIN_InitSymbols();
InitLock(&Lock);
IMG_AddInstrumentFunction(OnImage, 0);
RTN_AddInstrumentFunction(InstrumentRtn, 0);
PIN_InterceptDebuggingEvent(DEBUGGING_EVENT_BREAKPOINT, Intercept, 0);
PIN_InterceptDebuggingEvent(DEBUGGING_EVENT_ASYNC_BREAK, Intercept, 0);
PIN_AddFiniFunction(OnExit, 0);
PIN_StartProgram();
return 0;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:14,代码来源:pc-change-async-tool.cpp
示例9: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
RTN_AddInstrumentFunction(Rtn, 0);
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:14,代码来源:instrumentation_order19.cpp
示例10: main
int main(int argc, char *argv[])
{
// Initialize PIN library. Print help message if -h(elp) is specified
// in the command line or the command line is invalid
if(PIN_Init(argc,argv))
return Usage();
/// Instrumentations
// Register function to be called to instrument traces
TRACE_AddInstrumentFunction(trace_instrumentation, 0);
// Register function to be called when the application exits
PIN_AddFiniFunction(this_is_the_end, 0);
// Register function to be called when a module is loaded
IMG_AddInstrumentFunction(image_instrumentation, 0);
/// Other stuffs
// This routine will be called if the sleeping_thread calls PIN_Detach() (when the time is out)
PIN_AddDetachFunction(pin_is_detached, 0);
// Run a thread that will wait for the time out
PIN_SpawnInternalThread(
sleeping_thread,
0,
0,
NULL
);
// If we are in a wow64 process we must blacklist manually the JMP FAR: stub
// from being instrumented (each time a syscall is called, it will be instrumented for *nothing*)
// Its address is in FS:[0xC0] on Windows 7
ADDRINT wow64stub = __readfsdword(0xC0);
modules_blacklisted.insert(
std::make_pair(
std::string("wow64stub"),
std::make_pair(
wow64stub,
wow64stub
)
)
);
/// FIRE IN THE HOLE
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:0vercl0k,项目名称:stuffz,代码行数:49,代码来源:pin-code-coverage-measure.cpp
示例11: main
int main(int argc, char * argv[]){
//If we want to debug the program manually setup the proper options in order to attach an external debugger
if(Config::ATTACH_DEBUGGER){
initDebug();
}
MYINFO("->Configuring Pintool<-\n");
//get the start time of the execution (benchmark)
tStart = clock();
// Initialize pin
PIN_InitSymbols();
if (PIN_Init(argc, argv)) return Usage();
//Register PIN Callbacks
INS_AddInstrumentFunction(Instruction,0);
//TRACE_AddInstrumentFunction(Trace,0);
PIN_AddThreadStartFunction(OnThreadStart, 0);
IMG_AddInstrumentFunction(imageLoadCallback, 0);
PIN_AddFiniFunction(Fini, 0);
PIN_AddInternalExceptionHandler(ExceptionHandler,NULL);
//get theknob args
ConfigureTool();
if(Config::getInstance()->POLYMORPHIC_CODE_PATCH){
TRACE_AddInstrumentFunction(Trace,0);
}
proc_info->addProcAddresses();
//init the hooking system
HookSyscalls::enumSyscalls();
HookSyscalls::initHooks();
// Start the program, never returns
MYINFO("->Starting instrumented program<-\n");
PIN_StartProgram();
return 0;
}
开发者ID:seth1002,项目名称:pin_unpacking_antievasion,代码行数:49,代码来源:FindOEPPin.cpp
示例12: main
int main(int argc, char **argv)
{
if (PIN_Init(argc,argv)) usage();
file = fopen(KnobOutputFile.Value().c_str(),"w");
INS_AddInstrumentFunction(record_calls,0);
PIN_AddFiniFunction(finish,0);
PIN_StartProgram();
return 0;
}
开发者ID:rcode-git,项目名称:rcode-pintools,代码行数:15,代码来源:record_calls.cpp
示例13: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
outfile.open(KnobOutputFile.Value().c_str());
IMG_AddInstrumentFunction(ImageLoad, 0);
IMG_AddUnloadFunction(ImageUnload, 0);
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:EmilyBragg,项目名称:profiling-tool,代码行数:15,代码来源:bundle_tool.cpp
示例14: main
int main(int argc, char *argv[])
{
if( PIN_Init(argc,argv) )
{
return Usage();
}
IMG_AddInstrumentFunction(Image, 0);
PIN_AddFiniFunction(Fini, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:15,代码来源:flags_at_analysis_tool.cpp
示例15: main
int main (int argc, char *argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
IMG_AddInstrumentFunction (ImageLoad, 0);
// INS_AddInstrumentFunction(Ins, 0);
// PIN_AddSyscallEntryFunction(SyscallEntry, 0);
// PIN_AddSyscallExitFunction(SyscallExit, 0);
PIN_AddFiniFunction (Fini, 0);
PIN_StartProgram();
return 0;
}
开发者ID:EmilyBragg,项目名称:profiling-tool,代码行数:15,代码来源:replace_rtl_alloc_heap.cpp
示例16: 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 Usage();
PIN_AddThreadStartFunction(ThreadStart, 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,代码行数:16,代码来源:thcnt.cpp
示例17: main
int main(int argc, char * argv[])
{
PIN_InitSymbols();
PIN_Init(argc, argv);
out.open(KnobOutput.Value().c_str());
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(AtEnd, 0);
// Never returns
PIN_StartProgram();
return 0;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:15,代码来源:operandtool.cpp
示例18: 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);
PIN_AddFiniFunction(Fini, 0);
PIN_StartProgram();
return 0;
}
开发者ID:Debug-Orz,项目名称:stuffz,代码行数:15,代码来源:Simple-loop-detection-via-the-instruction-counter.cpp
示例19: 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 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:EmilyBragg,项目名称:profiling-tool,代码行数:17,代码来源:reg_operands_test_tool.cpp
示例20: main
int main(int argc, char * argv[])
{
if (PIN_Init(argc, argv)) return -1;;
// Register Instruction to be called to instrument instructions
INS_AddInstrumentFunction(Instruction, 0);
PIN_AddFiniFunction(Fini, 0);
// Start the program, never returns
PIN_StartProgram();
return 0;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:16,代码来源:mmx_test2_tool.cpp
注:本文中的PIN_AddFiniFunction函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论