int main(INT32 argc, CHAR **argv) { PIN_Init(argc, argv); PIN_AddApplicationStartFunction(AppStart, 0); PIN_AddThreadStartFunction(ThreadStart, 0); // Never returns PIN_StartProgram(); return 0; }
int main(int argc, char** argv) { if (!PIN_Init(argc, argv)) { masterPid = getpid(); buildMasterFile(); generated = fopen("threadOrder_generated.out", "w"); assert(generated != NULL); IMG_AddInstrumentFunction(onImageLoad, 0); PIN_AddThreadAttachProbedFunction(onThreadAttach, 0); PIN_AddApplicationStartFunction(onAppStart, 0); PIN_StartProgramProbed(); } return(1); }
//-------------------------------------------------------------------------- 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(); // Register function to be called to instrument traces TRACE_AddInstrumentFunction(trace_cb, 0); // Register function to be called at application start time PIN_AddApplicationStartFunction(app_start_cb, 0); // Register function to be called when the application exits PIN_AddFiniFunction(fini_cb, 0); // Start the program, never returns PIN_StartProgram(); return 0; }
int main( INT32 argc, CHAR *argv[] ) { // Initialization. PIN_InitSymbols(); PIN_Init(argc, argv); // Open the tool's output file for printing the loaded images. outFile.open(KnobImagesLog.Value().c_str()); if(!outFile.is_open() || outFile.fail()) { cerr << "TOOL ERROR: Unable to open the images file." << endl; PIN_ExitProcess(1); } // Add instrumentation. IMG_AddInstrumentFunction(ImageLoad, 0); PIN_AddApplicationStartFunction(OnAppStart, 0); PIN_AddFiniFunction(Fini, 0); // Start the program. PIN_StartProgram(); // never returns return 0; }