当前位置: 首页>>代码示例>>C++>>正文


C++ PIN_InitSymbols函数代码示例

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


在下文中一共展示了PIN_InitSymbols函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

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

    OutFile.open("iarg_tsc5.out");

    IMG_AddInstrumentFunction(Image, 0);
    PIN_AddFiniFunction(Fini, 0);

    PIN_StartProgram();
    return 0;
}
开发者ID:EmilyBragg,项目名称:profiling-tool,代码行数:13,代码来源:iarg_tsc5.cpp

示例2: main

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

    TRACE_AddInstrumentFunction(Trace, 0);
    IMG_AddInstrumentFunction(Image, 0);
    
    // Never returns
    PIN_StartProgram();
    
    return 0;
}
开发者ID:aarony,项目名称:arm-v7a-pintool,代码行数:13,代码来源:swizzle4.C

示例3: main

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

    if (!PIN_Init(argc, argv))
    {
        IMG_AddInstrumentFunction(on_module_loading,  0);        

        PIN_StartProbedProgram();
    }

    exit(1);
}
开发者ID:gungun1010,项目名称:hidden,代码行数:13,代码来源:exception_in_probed_call_sig.cpp

示例4: 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

示例5: main

int main(int argc, CHAR *argv[])
{
    PIN_InitSymbols();
    if (PIN_Init(argc,argv))
        return 1;

    TraceFile.open(KnobOutputFile.Value().c_str());

    IMG_AddInstrumentFunction(ImageLoad, 0);
    PIN_StartProgramProbed();

    return 0;
}
开发者ID:asudhak,项目名称:peachfuzz-code,代码行数:13,代码来源:malloctrace_locktest.cpp

示例6: main

int main(int argc, char * argv[])
{
    // prepare for image instrumentation mode
    PIN_InitSymbols();

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

    // Start the program, never returns
    PIN_StartProgram();
    
    return 0;
}
开发者ID:fedorova,项目名称:vividperf,代码行数:13,代码来源:null.cpp

示例7: 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

示例8: 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_StartProgram();
    
    return 0;
}
开发者ID:cl-wood,项目名称:stubble,代码行数:14,代码来源:salwanUseAfterFree.cpp

示例9: 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

示例10: main

int main(INT32 argc, CHAR **argv)
{
    PIN_InitSymbols();
    PIN_Init(argc, argv);
    
    out.open(KnobOutput.Value().c_str());
    
    IMG_AddInstrumentFunction(ImageLoad, 0);
    
    // Never returns
    PIN_StartProgram();
    
    return 0;
}
开发者ID:alagenchev,项目名称:school_code,代码行数:14,代码来源:undecorate.cpp

示例11: 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

示例12: main

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

    // Initialize pin
    PIN_Init(argc, argv);
    TraceFile.open(KnobOutputFile.Value().c_str());
    IMG_AddInstrumentFunction(imageLoad, 0);

    // Start the program, never returns
    PIN_StartProgramProbed();

    return 0;
}
开发者ID:sarachour,项目名称:siact,代码行数:14,代码来源:imageLoad_tool.cpp

示例13: 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

示例14: tool_

Pintool <T>::Pintool (int argc, char * argv [])
: tool_ (0),
  cmdline_error_ (false)
{
  PIN_InitSymbols ();
  this->cmdline_error_ = PIN_Init (argc, argv);

  if (this->cmdline_error_)
    std::cerr
      << "*** error parsing command line arguments" << std::endl
      << KNOB_BASE::StringKnobSummary () << std::endl;
  else
    this->tool_ = new T ();
}
开发者ID:JaonLin,项目名称:PinPP,代码行数:14,代码来源:Pintool.cpp

示例15: 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


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