本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 ();
}
示例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;
}