• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PIN_StartProgram函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PIN_StartProgram函数的典型用法代码示例。如果您正苦于以下问题:C++ PIN_StartProgram函数的具体用法?C++ PIN_StartProgram怎么用?C++ PIN_StartProgram使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PIN_StartProgram函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:19,代码来源:exception_monitor.cpp


示例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;
}
开发者ID:aarony,项目名称:arm-v7a-pintool,代码行数:20,代码来源:proccount.C


示例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;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:19,代码来源:reg_inst_gx.cpp


示例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;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:20,代码来源:codecache_stress.cpp


示例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;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:19,代码来源:swizzle5.cpp


示例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;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:20,代码来源:data_in_code_win.cpp


示例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;
}
开发者ID:sarachour,项目名称:siact,代码行数:19,代码来源:thread_count2.cpp


示例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;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:19,代码来源:inlined-stack-arg2.cpp


示例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;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:20,代码来源:set_ymm_scratches_allscratch.cpp


示例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;
}
开发者ID:andrewjinyounglee,项目名称:PerVERT,代码行数:20,代码来源:repcmpsz_tool.cpp


示例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;
}
开发者ID:CYBoys,项目名称:RunTracer,代码行数:20,代码来源:testcntx.cpp


示例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;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:20,代码来源:regmix.cpp


示例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;
}
开发者ID:alugupta,项目名称:resilient-systems,代码行数:20,代码来源:popea_verifier.cpp


示例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;
}
开发者ID:gungun1010,项目名称:hidden,代码行数:20,代码来源:rewritememop.cpp


示例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;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:20,代码来源:instrumentation_order4.cpp


示例16: 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);

    IMG_AddInstrumentFunction(Image, 0);

    PIN_AddFiniFunction(Fini, 0);

    // Start the program, never returns
    PIN_StartProgram();
    
    return 0;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:20,代码来源:special_case_aoti.cpp


示例17: main

int main(int argc, char *argv[])
{
#if defined(USE_DECODE_CACHE)
    out = new std::ofstream("xed-with-cache.out");
#else
    out = new std::ofstream("xed-no-cache.out");
#endif

    if( PIN_Init(argc,argv) )
        return Usage();
    INS_AddInstrumentFunction(Instruction, 0);

    memset(histo,0,sizeof(UINT64)*MAX_BINS);
    /* FIXME: single threaded tests only */
    UINT32 cache_limit = 16*1024;
    xed_decode_cache_initialize(&cache, new xed_decode_cache_entry_t[cache_limit], cache_limit);
    PIN_AddFiniFunction(Fini, 0);
    PIN_StartProgram();    // Never returns
    return 0;
}
开发者ID:andrewjinyounglee,项目名称:PerVERT,代码行数:20,代码来源:xed-cache.cpp


示例18: main

int main(int argc, char * argv[])
{

    file  = fopen("itrace.out", "w");
    
    // Initialize pin
	PIN_InitSymbols();

    if (PIN_Init(argc, argv)) return Usage();

	TRACE_AddInstrumentFunction(Trace,0);

    // Register Fini to be called when the application exits
    PIN_AddFiniFunction(Fini, 0);
    
    // Start the program, never returns
    PIN_StartProgram();
    
    return 0;
}
开发者ID:fonstest,项目名称:PINTOOLS,代码行数:20,代码来源:MyPinTool.cpp


示例19: main

int main(int argc, char * argv[])
{    
    PIN_Init(argc, argv);
    PIN_InitSymbols();

    globalReserve = malloc(ReserveSize);
    PIN_AddOutOfMemoryFunction(Assert, 0);
    PIN_AddOutOfMemoryFunction(OutOfMem, 0);

#if defined(TARGET_LINUX) || defined(TARGET_BSD) || defined(TARGET_MAC)
    LimitAvailableSpace();
#endif

    out = fopen(KnobOutputFile.Value().c_str(), "w");

    PIN_AddFiniFunction(Fini, 0);
    PIN_StartProgram();
 
    return 0;
}
开发者ID:FengXingYuXin,项目名称:SHMA,代码行数:20,代码来源:memalloc2.cpp


示例20: main

int main(int argc, char *argv[]) {
  prof_ctrl->Initialize();
  prof_ctrl->PreSetup();
  PIN_InitSymbols();
  PIN_Init(argc, argv);
  prof_ctrl->PostSetup();
  TRACE_AddInstrumentFunction(I_InstrumentTrace, NULL);
  IMG_AddInstrumentFunction(I_ImageLoad, NULL);
  IMG_AddUnloadFunction(I_ImageUnload, NULL);
  PIN_AddSyscallEntryFunction(I_SyscallEntry, NULL);
  PIN_AddSyscallExitFunction(I_SyscallExit, NULL);
  PIN_InterceptSignal(SIGUSR2, I_IntSignal, NULL);
  PIN_AddContextChangeFunction(I_ContextChange, NULL);
  PIN_AddFiniFunction(I_ProgramExit, NULL);
  PIN_AddThreadStartFunction(I_ThreadStart, NULL);
  PIN_AddThreadFiniFunction(I_ThreadExit, NULL);
  I_ProgramStart();
  // start the program
  PIN_StartProgram();
}
开发者ID:poeliu,项目名称:Pinso,代码行数:20,代码来源:profiler_main.cpp



注:本文中的PIN_StartProgram函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PIOS_Assert函数代码示例发布时间:2022-05-30
下一篇:
C++ PIN_SET函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap