LEVEL_PINCLIENT Namespace Reference


Typedefs

typedef map< SYM, ADDRINT > SYM_RESOLVER_VS_ACTUAL_ADDRESS_IFUNC_MAP
typedef LEVEL_BASE::CHILD_PROCESS_CLASS * CHILD_PROCESS
typedef BOOL(* FOLLOW_CHILD_PROCESS_CALLBACK )(CHILD_PROCESS childProcess, VOID *val)
typedef BOOL(* DEBUG_INTERPRETER_CALLBACK )(THREADID threadIndex, CONTEXT *ctxt, const std::string &cmd, std::string *reply, VOID *v)
typedef BOOL(* DEBUG_BREAKPOINT_CALLBACK )(ADDRINT addr, UINT size, BOOL insert, VOID *v)
typedef BOOL(* INTERCEPT_DEBUGGING_EVENT_CALLBACK )(THREADID tid, DEBUGGING_EVENT eventType, CONTEXT *ctxt, VOID *arg)
typedef VOID(* GET_EMULATED_REGISTER_CALLBACK )(unsigned toolRegId, THREADID tid, CONTEXT *ctxt, VOID *data, VOID *v)
typedef VOID(* SET_EMULATED_REGISTER_CALLBACK )(unsigned toolRegId, THREADID tid, CONTEXT *ctxt, const VOID *data, VOID *v)
typedef USIZE(* GET_TARGET_DESCRIPTION_CALLBACK )(const std::string &name, USIZE size, VOID *buf, VOID *v)
typedef VOID(* SIGNAL_BEFORE_CALLBACK )(THREADID threadIndex, INT32 sig, const CONTEXT *ctxtFrom, const CONTEXT *ctxtTo, VOID *v)
typedef VOID(* SIGNAL_AFTER_CALLBACK )(THREADID threadIndex, const CONTEXT *ctxtFrom, const CONTEXT *ctxtTo, VOID *v)
typedef VOID(* THREAD_BEGIN_CALLBACK )(THREADID threadIndex, VOID *sp, int flags, VOID *v)
typedef VOID(* THREAD_END_CALLBACK )(THREADID threadIndex, INT32 code, VOID *v)
typedef BOOL(* SIGNAL_INTERCEPT_CALLBACK )(THREADID threadIndex, INT32 sig, CONTEXT *ctxt, BOOL hasHndlr, VOID *v)
typedef VOID(* IMAGECALLBACK )(IMG, VOID *)
typedef map< ADDRINT, USIZE > CODE_RANGES
typedef EXCEPT_HANDLING_RESULT(* INTERNAL_EXCEPTION_CALLBACK )(THREADID tid, EXCEPTION_INFO *pExceptInfo, PHYSICAL_CONTEXT *pPhysCtxt, VOID *v)
typedef VOID(* TRACEGENCODE_CALLBACK )(TRACE trace, VOID *v)
typedef TRACE_CLASS * TRACE
typedef VOID * PIN_CONFIGURATION_INFO
typedef COMPLEX_CALLBACKVAL_BASE * PIN_CALLBACK
typedef VOID(* REMOVE_INSTRUMENTATION_CALLBACK )(VOID *v)
typedef VOID(* DETACH_CALLBACK )(VOID *v)
typedef VOID(* DETACH_PROBED_CALLBACK )(VOID *v)
typedef VOID(* ATTACH_PROBED_CALLBACK )(VOID *v)
typedef VOID(* ATTACH_CALLBACK )(VOID *v)
typedef VOID(* APPLICATION_START_CALLBACK )(VOID *v)
typedef VOID(* PREPARE_FOR_FINI_CALLBACK )(VOID *v)
typedef VOID(* FINI_CALLBACK )(INT32 code, VOID *v)
typedef size_t(* FETCH_CALLBACK )(void *buf, ADDRINT addr, size_t size, EXCEPTION_INFO *pExceptInfo, VOID *v)
typedef VOID(* OUT_OF_MEMORY_CALLBACK )(size_t size, VOID *v)
typedef ADDRINT(PIN_FAST_ANALYSIS_CALL * MEMORY_ADDR_TRANS_CALLBACK )(PIN_MEM_TRANS_INFO *memTransInfo, VOID *v)
typedef VOID(* SMC_CALLBACK )(ADDRINT traceStartAddress, ADDRINT traceEndAddress, VOID *v)
typedef VOID(* FORK_CALLBACK )(THREADID threadid, const CONTEXT *ctxt, VOID *v)
typedef VOID(* THREAD_START_CALLBACK )(THREADID threadIndex, CONTEXT *ctxt, INT32 flags, VOID *v)
typedef VOID(* THREAD_ATTACH_PROBED_CALLBACK )(VOID *sigmask, VOID *v)
typedef VOID(* THREAD_DETACH_PROBED_CALLBACK )(VOID *v)
typedef VOID(* THREAD_ATTACH_CALLBACK )(THREADID threadIndex, CONTEXT *ctxt, VOID *v)
typedef VOID(* THREAD_DETACH_CALLBACK )(THREADID threadIndex, const CONTEXT *ctxt, VOID *v)
typedef VOID(* THREAD_FINI_CALLBACK )(THREADID threadIndex, const CONTEXT *ctxt, INT32 code, VOID *v)
typedef VOID(* CONTEXT_CHANGE_CALLBACK )(THREADID threadIndex, CONTEXT_CHANGE_REASON reason, const CONTEXT *from, CONTEXT *to, INT32 info, VOID *v)
typedef VOID(* SYSCALL_ENTRY_CALLBACK )(THREADID threadIndex, CONTEXT *ctxt, SYSCALL_STANDARD std, VOID *v)
typedef VOID(* SYSCALL_EXIT_CALLBACK )(THREADID threadIndex, CONTEXT *ctxt, SYSCALL_STANDARD std, VOID *v)
typedef BOOL(* INTERCEPT_SIGNAL_CALLBACK )(THREADID tid, INT32 sig, CONTEXT *ctxt, BOOL hasHandler, const EXCEPTION_INFO *pExceptInfo, VOID *v)
typedef VOID(* PROBES_INSERTED_CALLBACK )(IMG img, VOID *v)
typedef VOID *(* TRACE_BUFFER_CALLBACK )(BUFFER_ID id, THREADID tid, const CONTEXT *ctxt, VOID *buf, UINT64 numElements, VOID *v)
typedef VOID(* INS_INSTRUMENT_CALLBACK )(INS ins, VOID *v)
typedef VOID(* TRACE_INSTRUMENT_CALLBACK )(TRACE trace, VOID *v)
typedef VOID(* RTN_INSTRUMENT_CALLBACK )(RTN rtn, VOID *v)

Enumerations

enum  UNDECORATION {
  UNDECORATION_COMPLETE,
  UNDECORATION_NAME_ONLY
}
enum  SYMBOL_INFO_MODE {
  NO_SYMBOLS = 0,
  EXPORT_SYMBOLS = (1<<0),
  DEBUG_SYMBOLS = (1<<1),
  IFUNC_SYMBOLS = (1<<2),
  DEBUG_OR_EXPORT_SYMBOLS = (DEBUG_SYMBOLS | EXPORT_SYMBOLS)
}
enum  IMAGE_LOAD_FLAGS {
  IMAGE_LOAD_NONE = 0x00,
  IMAGE_LOAD_MAINEXECUTABLE = 0x01,
  IMAGE_LOAD_FOUNDINMEMORY = 0x02,
  IMAGE_LOAD_RUNTIME = 0x04,
  IMAGE_LOAD_TEXTFROMIMAGE = 0x08,
  IMAGE_LOAD_INTERPRETER = 0x10
}
enum  PROBE_TAG {
  PROBE_TAG_OK,
  PROBE_TAG_BRANCH_TARGET,
  PROBE_TAG_POSSIBLE_UNIDENTIFIED_BRANCH_TARGET,
  PROBE_TAG_BRANCH_PAST_END,
  PROBE_TAG_TOO_SMALL,
  PROBE_TAG_PREV_PROBE,
  PROBE_TAG_RUNTIME_FIXUP,
  PROBE_TAG_RELOCATE,
  PROBE_TAG_NOT_RELOCATABLE,
  PROBE_TAG_UNKNOWN
}
enum  REPLAY_MODE {
  REPLAY_MODE_NONE = 0x00,
  REPLAY_MODE_IMAGEOPS = 0x01,
  REPLAY_MODE_ALL = REPLAY_MODE_IMAGEOPS
}
enum  PROBE_MODE {
  PROBE_MODE_DEFAULT = 0,
  PROBE_MODE_ALLOW_RELOCATION = (1<<0)
}
enum  SMC_ENABLE_DISABLE_TYPE {
  SMC_ENABLE,
  SMC_DISABLE
}
enum  FPOINT {
  FPOINT_BEFORE,
  FPOINT_AFTER_IN_PARENT,
  FPOINT_AFTER_IN_CHILD
}
enum  ATTACH_STATUS {
  ATTACH_INITIATED,
  ATTACH_FAILED_DETACH
}
enum  CONDINSTSTATE {
  CONDINST_NORMAL,
  CONDINST_IF,
  CONDINST_THEN
}
enum  REPLAY_IMAGE_TYPE {
  REPLAY_IMAGE_TYPE_REGULAR = 0,
  REPLAY_IMAGE_TYPE_MAIN_EXE = 1,
  REPLAY_IMAGE_TYPE_INTERPRETER = 2
}
enum  {
  TLS_KEY_INTERNAL_EXCEPTION,
  TLS_KEY_CLIENT_FIRST,
  TLS_KEY_CLIENT_LAST = TLS_KEY_CLIENT_FIRST + 63
}

Functions

LOCALFUN UINT32 calc32CRC (const CHAR *start, UINT32 size)
string FindGnuDebugLinkFile (IMG img, CHAR **imageStart, size_t *imageSize)
LOCALINLINE IMAGE_INIT_SESSION * ImageInitSession ()
BOOL IMG_IsStandardLoaderLibrary (IMG img)
BOOL IMG_IsStandardSystemLibrary (IMG img)
BOOL IMG_IsStandardThreadLibrary (IMG img)
BOOL IMG_IsStandardGccLibrary (IMG img)
LOCALFUN AUXTYPE * FindAuxBase (CHAR **argv)
LOCALFUN ADDRINT AppAuxValue (UINT64 type)
LOCALFUN ADDRINT LoaderAddress ()
LOCALFUN ADDRINT VdsoAddress ()
template<typename LOADERINFO>
LOCALTEMPLATEFUN BOOL ValidateLoaderInfo (LOADERINFO loaderInfo)
VOID NotifyDebuggerOnImageLoad (BOOL isMain, VOID *loaderInfo)
VOID NotifyDebuggerOnImageUnload (VOID *loaderInfo)
LOCALFUN LINUX_LOADER_IMAGE_INFO * MakeLoaderInfoFromLinkMap (const string &name, struct link_map *lm)
LOCALFUN IMG ImageByName (const string &name)
LOCALFUN LINUX_LOADER_IMAGE_INFO * NotifyDebuggerOnElfImageLoad (BOOL isMain, BOOL isInterp, const string &name, struct link_map *lm)
LOCALFUN VOID ProcessLoadedImage (IMG img, LINUX_LOADER_IMAGE_INFO *li)
template<typename PTR>
LOCALTEMPLATEFUN PTR TranslateMemoryPointer (PTR ptr)
LOCALFUN VOID ScanLibrariesUnlocked ()
LOCALFUN VOID ScanLibrariesLocked ()
LOCALFUN VOID OnLoaderBreak (THREADID threadid, const CONTEXT *ctxt)
ADDRINT ResolveIFunc (ADDRINT resolver)
LOCALFUN VOID OnLoaderBreakProbe ()
LOCALFUN VOID ReadElfHeader (CHAR const *file, EHDR *ehdr)
LOCALFUN ADDRINT MainImageLoadOffset (CHAR const *file)
LOCALFUN VOID ScanLibraries ()
VOID ImageInitialize (BOOL forReplay)
VOID ImageUnInitialize ()
BOOL RTN_CheckFixups (RTN rtn, INS target_ins, UINT32 probe_size)
VOID ImageInstrument (TRACE trace)
VOID IMG_UnmapImage (IMG img)
VOID IMG_FreeDebugInfo (IMG img)
VOID NotifyDataRanges (IMG img, CODE_RANGES *rangeMap)
BOOL IMG_GetSubprogramsInfo (IMG img, map< ADDRINT, SymbolDebugInfo > &routines)
LOCALVAR KNOB< BOOL > KnobDisablePLTSyms (KNOB_MODE_WRITEONCE,"supported","disable_plt_syms","0","Disable synthesizing symbols for PLT entries")
LOCALNSFUN BOOL operator< (const SYM_BASIC_INFO &lhs, const SYM_BASIC_INFO &rhs)
VOID PIN_InitSymbols ()
BOOL PIN_SymbolsInit ()
BOOL PIN_InitSymbolsAlt (SYMBOL_INFO_MODE mode)
LOCALFUN VOID AddSym (SYM sym, IMG img, BOOL dynamic, const CHAR *sym_name, const SYMREC *rawsym, UINT32 imgsize, IADDR iaddr, SYM_IFUNC_TYPE Ifunc_type)
template<typename SYMBOL_TYPE>
LOCALTEMPLATEFUN VOID ConvertSym (SYMREC *sym_dst, const SYMBOL_TYPE *sym_src)
LOCALFUN VOID CookSymIfuncSec (IMG img, SYM ifunc_resolver, const SYMREC *symrec, SYM_RESOLVER_VS_ACTUAL_ADDRESS_IFUNC_MAP *sym_resolver_vs_actual_address_ifunc_map)
LOCALFUN BOOL GetPltSec (IMG img, SEC *plt_sec, SEC *relocation_Sec)
template<typename SYMBOL_TYPE>
LOCALTEMPLATEFUN VOID CookSymPltSec (IMG img, const SYMBOL_TYPE *array, const CHAR *string_table)
template<typename SYMBOL_TYPE>
LOCALTEMPLATEFUN VOID CookSymSec (set< SYM_BASIC_INFO > &symbolSet, SEC sec_symtab, SEC sec_strtab, BOOL dynamic, SYM_RESOLVER_VS_ACTUAL_ADDRESS_IFUNC_MAP *sym_resolver_vs_actual_address_ifunc_map)
LOCALFUN BOOL CompareSyms (const SYM &s1, const SYM &s2)
LOCALFUN VOID IMG_SortRegsymsByIaddr (IMG img)
VOID CookRegsym (IMG img, SYM_RESOLVER_VS_ACTUAL_ADDRESS_IFUNC_MAP *sym_resolver_vs_actual_address_ifunc_map)
ADDRINT IMG_FindDataSymbolAddress (IMG origImg, const CHAR *symname)
BOOL SYM_IsDataMarker (SYM sym)
LOCALFUN string SYM_NameNoVersion (const string &symbolName)
LOCALFUN size_t skipBackwardsMatchedPair (const string &undecoratedName, size_t pos, char openBra, char closeBra)
LOCALFUN size_t skipBackwardsTemplatedName (const string &undecoratedName, size_t pos)
LOCALFUN string sanitize (const string &original)
LOCALFUN string cplus_demangle (const string &name, UNDECORATION style)
string SYM_UndecorateName (const string &symbolName, UNDECORATION style)
VOID AotiRecordCall (IPOINT action, INS ins, ACALL const *acall)
VOID AotiRecordMutation (INS ins, EXT ext)
VOID AotiPlaybackCall (INS ins)
BOOL AotiInstrumentationExists ()
VOID AotiRemoveImageInstrumentation (IMG img)
PIN_CALLBACK PIN_AddFollowChildProcessFunction (FOLLOW_CHILD_PROCESS_CALLBACK fun, VOID *val)
VOID PIN_RemoveFollowChildProcessFunctions ()
LOCALFUN BOOL CallFollowChildProcess (CHILD_PROCESS childProcess, const char **toolAppend)
VOID InitializeFollowChildClient ()
OS_PROCESS_ID CHILD_PROCESS_GetId (CHILD_PROCESS childProcess)
VOID CHILD_PROCESS_GetCommandLine (CHILD_PROCESS childProcess, INT *pArgc, const CHAR *const **pArgv)
VOID CHILD_PROCESS_SetPinCommandLine (CHILD_PROCESS childProcess, INT argc, const CHAR *const *argv)
void PIN_GetSourceLocation (ADDRINT address, INT32 *column, INT32 *line, string *fileName)
LOCALFUN BOOL CallDebugInterpreters (THREADID, CONTEXT *, const char *, const char **)
LOCALFUN BOOL CallBreakpointHandlers (ADDRINT, USIZE, BOOL)
LOCALFUN BOOL CallInterceptedDebuggingEvent (THREADID, DEBUGGING_EVENT, CONTEXT *)
LOCALFUN VOID GetEmulatedRegister (unsigned, THREADID, CONTEXT *, VOID *)
LOCALFUN VOID SetEmulatedRegister (unsigned, THREADID, CONTEXT *, const VOID *)
LOCALFUN USIZE GetTargetDescription (const std::string &, USIZE, VOID *)
VOID DebuggerClientInitialize ()
PIN_CALLBACK PIN_AddDebugInterpreter (DEBUG_INTERPRETER_CALLBACK fun, VOID *val)
VOID PIN_RemoveDebugInterpreter (DEBUG_INTERPRETER_CALLBACK fun)
PIN_CALLBACK PIN_AddBreakpointHandler (DEBUG_BREAKPOINT_CALLBACK fun, VOID *val)
VOID PIN_RemoveBreakpointHandler (DEBUG_BREAKPOINT_CALLBACK fun)
VOID PIN_ResetBreakpointAt (ADDRINT addr)
VOID PIN_ApplicationBreakpoint (const CONTEXT *ctxt, THREADID tid, BOOL waitIfNoDebugger, const std::string &msg)
BOOL PIN_SetDebugMode (const DEBUG_MODE *mode)
DEBUG_STATUS PIN_GetDebugStatus ()
BOOL PIN_GetDebugConnectionInfo (DEBUG_CONNECTION_INFO *info)
DEBUGGER_TYPE PIN_GetDebuggerType ()
BOOL PIN_WaitForDebuggerToConnect (unsigned timeout)
BOOL PIN_GetStoppedThreadPendingToolBreakpoint (THREADID tid, std::string *msg)
BOOL PIN_ChangePendingToolBreakpointOnStoppedThread (THREADID tid, BOOL squash, const std::string &msg)
VOID PIN_InterceptDebuggingEvent (DEBUGGING_EVENT eventType, INTERCEPT_DEBUGGING_EVENT_CALLBACK fun, VOID *arg)
VOID PIN_AddDebuggerRegisterEmulator (unsigned numRegisters, const DEBUGGER_REG_DESCRIPTION *registerDescriptions, GET_EMULATED_REGISTER_CALLBACK getFun, SET_EMULATED_REGISTER_CALLBACK setFun, GET_TARGET_DESCRIPTION_CALLBACK getDescriptionFun, VOID *val)
VOID DeprecatedCallSignalBefores (THREADID threadIndex, INT32 sig, const CONTEXT *from, const CONTEXT *to)
VOID DeprecatedCallSignalAfters (THREADID threadIndex, const CONTEXT *from, const CONTEXT *to)
VOID DeprecatedCallThreadBegins (THREADID threadIndex, VOID *sp, int flags)
VOID DeprecatedCallThreadEnds (THREADID threadIndex, INT32 code)
LOCALFUN BOOL CallSignalIntercept (THREADID tid, INT32 sig, CONTEXT *ctxt, BOOL hasHandler, const EXCEPTION_INFO *pExceptInfo, VOID *v)
PIN_DEPRECATED_API BOOL PIN_AddSignalBeforeFunction (SIGNAL_BEFORE_CALLBACK fun, VOID *val)
PIN_DEPRECATED_API BOOL PIN_AddSignalAfterFunction (SIGNAL_AFTER_CALLBACK fun, VOID *val)
PIN_DEPRECATED_API BOOL PIN_AddSignalInterceptFunction (INT32 sig, SIGNAL_INTERCEPT_CALLBACK fun, VOID *val)
PIN_DEPRECATED_API VOID PIN_AddThreadBeginFunction (THREAD_BEGIN_CALLBACK fun, VOID *val)
PIN_DEPRECATED_API VOID PIN_AddThreadEndFunction (THREAD_END_CALLBACK fun, VOID *val)
PIN_DEPRECATED_API VOID PIN_StartProbedProgram ()
PIN_DEPRECATED_API BOOL RTN_IsSafeForProbe (RTN rtn)
PIN_DEPRECATED_API VOID RTN_ReplaceWithUninstrumentedRoutine (RTN replacedRtn, AFUNPTR replacementFun)
PIN_DEPRECATED_API BOOL CODECACHE_FlushCache ()
PIN_DEPRECATED_API UINT32 CODECACHE_InvalidateTraceAtProgramAddress (ADDRINT app_pc)
PIN_DEPRECATED_API UINT32 CODECACHE_InvalidateRange (ADDRINT start, ADDRINT end)
PIN_DEPRECATED_API BOOL TRACE_Original (TRACE trace)
LOCALVAR KNOB_COMMENT KnobSymFamily ("pintool:sym","Symbols controls")
LOCALVAR KNOB< BOOL > KnobUnrestrictedRtnSize (KNOB_MODE_WRITEONCE,"pintool:sym","unrestricted_rtn_size","0","Use the unrestricted RTN size. ""When set the RTN size defined by the distance between RTN start to the beginning of next RTN.")
LOCALVAR KNOB< BOOL > KnobShortName (KNOB_MODE_WRITEONCE,"pintool:sym","short_name","0","Use the shortest name for the RTN. ""Names with version substrings are preferred over the same name without the substring.")
LOCALVAR KNOB< BOOL > KnobIgnoreDebugInfo (KNOB_MODE_WRITEONCE,"pintool:sym","ignore_debug_info","0","Ignore debug info for the image. Symbols are taken from the symbol tables.")
LOCALVAR KNOB< string > KnobReduceRtnSizeMode (KNOB_MODE_WRITEONCE,"pintool:sym","reduce_rtn_size_mode","auto","Mode for RTN size reduction: delete trailing instructions after RET if there is no ""jump to the rtn part after the RET. ""Possible modes are: auto/never/always")
KNOB< BOOL > KnobJitApi (KNOB_MODE_WRITEONCE,"pintool:sym","support_jit_api","0","Enables the Jitted Functions Support")
LOCALFUN BOOL IMG_is_shadow_img (IMG img)
IMG IMG_Next (IMG img)
IMG IMG_Prev (IMG img)
IMG IMG_Invalid ()
BOOL IMG_Valid (IMG img)
SEC IMG_SecHead (IMG img)
SEC IMG_SecTail (IMG img)
SYM IMG_RegsymHead (IMG img)
ADDRINT IMG_Entry (IMG img)
const string & IMG_Name (IMG img)
ADDRINT IMG_Gp (IMG img)
ADDRINT IMG_LoadOffset (IMG img)
ADDRINT IMG_LowAddress (IMG img)
ADDRINT IMG_HighAddress (IMG img)
ADDRINT IMG_StartAddress (IMG img)
USIZE IMG_SizeMapped (IMG img)
IMG_TYPE IMG_Type (IMG img)
BOOL IMG_IsMainExecutable (IMG x)
BOOL IMG_IsInterpreter (IMG x)
BOOL IMG_IsStaticExecutable (IMG x)
BOOL IMG_IsVDSO (IMG img)
UINT32 IMG_NumRegions (IMG img)
ADDRINT IMG_RegionHighAddress (IMG img, UINT32 n)
ADDRINT IMG_RegionLowAddress (IMG img, UINT32 n)
RTN IMG_FindRtnByName (IMG img, const string &name)
LOCALFUN RTN FinalizeRtn (RTN rtn, USIZE size)
LOCALFUN VOID AddRtnsToMap (IMG img)
IMG IMG_CreateAt (const char *filename, ADDRINT start, USIZE size, ADDRINT loadOffset, BOOL mainExecutable)
IMG SEC_Img (SEC sec)
SEC SEC_Next (SEC sec)
SEC SEC_Prev (SEC sec)
SEC SEC_Invalid ()
BOOL SEC_Valid (SEC x)
RTN SEC_RtnHead (SEC sec)
RTN SEC_RtnTail (SEC sec)
const string & SEC_Name (SEC sec)
SEC_TYPE SEC_Type (SEC sec)
BOOL SEC_Mapped (SEC sec)
const VOID * SEC_Data (SEC sec)
SEC RTN_Sec (RTN x)
RTN RTN_Next (RTN x)
RTN RTN_Prev (RTN x)
RTN RTN_Invalid ()
BOOL RTN_Valid (RTN x)
LOCALINLINE RTN_OUTSIDE_RANGES & RtnOutsideRangesManager ()
LOCALFUN VOID DisassembleRegion (RTN rtn, BBL bbl, const VOID *current, const VOID *end, ADDRINT rtnStart, ADDRINT rtnEnd, ADDRINT rtnLimit, ADDRINT virtual_offset)
LOCALFUN INS DisassembleFirstIns (const VOID *current, const VOID *end, ADDRINT limit, ADDRINT virtual_offset)
LOCALFUN VOID FetchRtnIns (RTN rtn)
LOCALFUN INS FetchRtnInsFirstOnly (RTN rtn)
PIN_DEPRECATED_API BBL RTN_BblHead (RTN x)
PIN_DEPRECATED_API BBL RTN_BblTail (RTN x)
const string & RTN_Name (RTN x)
BOOL RTN_IsArtificial (RTN x)
SYM RTN_Sym (RTN x)
AFUNPTR RTN_Funptr (RTN x)
LOCALFUN VOID RTN_Destroy (RTN rtn)
UINT32 RTN_Id (RTN x)
PIN_DEPRECATED_API INT32 RTN_No (RTN x)
INS BBL_InsHead (BBL x)
INS BBL_InsTail (BBL x)
BBL BBL_Next (BBL x)
BBL BBL_Prev (BBL x)
BOOL BBL_Valid (BBL x)
BBL_TYPE BBL_Type (BBL x)
EDG EDG_NextSucc (EDG x)
EDG EDG_INVALID ()
BOOL EDG_Valid (EDG x)
EDG_TYPE EDG_Type (EDG x)
RTN INS_Rtn (INS x)
INS INS_Next (INS x)
INS INS_Prev (INS x)
INS INS_Invalid ()
BOOL INS_Valid (INS x)
ADDRINT INS_Address (INS ins)
USIZE INS_Size (INS ins)
ADDRINT INS_DirectBranchOrCallTargetAddress (INS ins)
ADDRINT INS_NextAddress (INS ins)
SYM SYM_Next (SYM x)
SYM SYM_Prev (SYM x)
const string & SYM_Name (SYM x)
SYM SYM_Invalid ()
BOOL SYM_Valid (SYM x)
BOOL SYM_Dynamic (SYM x)
BOOL SYM_GeneratedByPin (SYM x)
BOOL SYM_IFuncImplementation (SYM x)
BOOL SYM_IFuncResolver (SYM x)
ADDRINT SYM_Value (SYM x)
UINT32 SYM_Index (SYM x)
ADDRINT SYM_Address (SYM x)
IMG GetOpenImg ()
VOID ResetOpenRtn ()
VOID ResetOpenImg ()
VOID InitializeApp ()
VOID UnInitializeApp ()
UINT32 IMG_Id (IMG x)
IMG IMG_FindImgById (UINT32 id)
IMG IMG_FindByUnloadAddress (ADDRINT startAddress)
IMG IMG_FindByAddress (ADDRINT address)
IMG IMG_FindBySectionsAddress (ADDRINT address)
PIN_CALLBACK RTN_AddInstrumentFunction (RTN_INSTRUMENT_CALLBACK fun, VOID *val)
LOCALFUN BOOL operator< (const RTN_KEY &p1, const RTN_KEY &p2)
PIN_CALLBACK IMG_AddInstrumentFunction (IMAGECALLBACK fun, VOID *v)
VOID IMG_RemoveToolCallbacks ()
PIN_CALLBACK IMG_AddUnloadFunction (IMAGECALLBACK fun, VOID *v)
LOCALFUN VOID IMG_Destroy (IMG img)
VOID ProcessImageUnload (IMG img, BOOL copyBits)
VOID PIN_UnloadAllImages (BOOL copyBits)
VOID ProcessModuleUnload (ADDRINT base)
USIZE RTN_Range (RTN rtn)
USIZE RTN_Size (RTN rtn)
RTN RTN_IFuncResolver (RTN rtn)
RTN RTN_IFuncImplementation (RTN rtn)
LOCALFUN VOID InitRtnToSym (RTN rtn, SYM sym)
LOCALFUN VOID UseShortName (RTN rtn, SYM sym)
LOCALFUN VOID BestFit (RTN rtn, SYM sym)
LOCALFUN INT SymPosition (SYM sym, const MemRange &range)
LOCALFUN VOID FindCodeRanges (IMG img, CODE_RANGES *rangeMap)
VOID NotifyDataRange (CODE_RANGES *rangeMap, ADDRINT base, USIZE size)
LOCALFUN VOID MakeRtns (IMG img)
VOID CallRtnCallbacks (RTN rtn)
LOCALFUN VOID CallRtnCallbacks (IMG img)
LOCALFUN VOID DsUpdatesDueRtnfuncCreation (RTN rtnToSplit, RTN originatedFromIfunc, ADDRINT rtnToSplitAddr, ADDRINT rtnToSplitSize, ADDRINT newRtnAddr)
LOCALFUN RTN handleIfuncSymbol (ADDRINT actualFuncAddr, SYM resolver, IMG img)
LOCALFUN VOID FixSymbolsFromDebugInfo (IMG img)
LOCALFUN IMG ImgLoad (const string &filename, const CHAR *trueFilename, ADDRINT load_offset, UINT32 flags, BOOL *unmapAfterProcessing, void *arg)
VOID IMG_RecordLoadOp (const string &imageName, const char *fileName, ADDRINT lo, UINT32 fl)
VOID IMG_RecordLoadOp (IMG img)
VOID IMG_ExecuteRecordedLoadOps ()
IMG IMG_Open (const string &filename)
VOID IMG_Close (IMG img)
LOCALFUN VOID ImageLoadProbes (IMG img)
IMG ProcessImageLoad (const string &filename, const CHAR *trueFilename, ADDRINT load_offset, UINT32 flags, void *loaderInfo, void *arg)
IMG ProcessImageLoad (const string &filename, const CHAR *trueFilename, ADDRINT load_offset, UINT32 flags, void *arg)
VOID IMG_ReplayImageLoad (IMG img)
VOID * IMG_GetLoaderInfo (IMG img)
VOID IMG_SetLoaderInfo (IMG img, VOID *loaderInfo)
VOID CompleteImageLoad (IMG img, void *arg)
VOID InitDynamicCodeImage (IMG newImg)
BOOL IsPinLoaded (const string &name)
string RTN_FindNameByAddress (ADDRINT address)
RTN RTN_FindByAddress (ADDRINT address)
RTN RTN_FindByName (IMG img, const CHAR *name)
VOID RTN_Open (RTN rtn)
VOID RTN_OpenAndFetch (RTN rtn)
VOID RTN_Close (RTN rtn)
INS RTN_InsHead (RTN rtn)
INS RTN_InsHeadOnly (RTN rtn)
INS RTN_InsTail (RTN rtn)
UINT32 RTN_NumIns (RTN rtn)
VOID RTN_InsertCall (RTN rtn, IPOINT action, AFUNPTR funptr,...)
ADDRINT RTN_Address (RTN rtn)
RTN RTN_CreateAt (ADDRINT address, string name)
RTN RTN_CreateJitFunction (IMG img, ADDRINT address, const string &name, USIZE size)
VOID RTN_DestroyJitFunction (ADDRINT address)
BOOL RTN_IsDynamic (RTN rtn)
ADDRINT SEC_Address (SEC sec)
BOOL SEC_IsReadable (SEC sec)
BOOL SEC_IsWriteable (SEC sec)
BOOL SEC_IsExecutable (SEC sec)
USIZE SEC_Size (SEC sec)
BOOL BBL_Original (BBL bbl)
ADDRINT BBL_Address (BBL bbl)
USIZE BBL_Size (BBL bbl)
IMG APP_ImgHead ()
IMG APP_ImgTail ()
BOOL ToolUseImageAPI ()
string PIN_UndecorateSymbolName (const string &symbolName, UNDECORATION style)
PIN_CALLBACK PIN_AddInternalExceptionHandler (INTERNAL_EXCEPTION_CALLBACK fun, VOID *val)
VOID PIN_TryStart (THREADID tid, INTERNAL_EXCEPTION_CALLBACK fun, VOID *val)
VOID PIN_TryEnd (THREADID tid)
LOCALFUN string ProbeTag_String (PROBE_TAG tag)
BBL TRACE_AddInlineReturnEdg (TRACE trace)
BBL TRACE_AddInlineCallEdg (TRACE trace)
BBL TRACE_AddBranchEdg (TRACE trace)
BBL TRACE_AddFallthroughEdg (TRACE trace)
VOID TRACE_StraightenControlFlow (TRACE trace)
LOCALFUN BOOL PIN_InsertProbeImp (ADDRINT src_addr, ADDRINT dst_addr, USIZE probeSize)
BOOL PIN_InsertProbe (ADDRINT src_addr, ADDRINT dst_addr)
VOID PIN_RemoveProbe (ADDRINT address)
ADDRINT TRACE_GenerateCode (TRACE trace)
BOOL INS_IsPinXfer (INS ins)
BOOL INS_IsNativeXfer (INS ins)
VOID INS_SetNativeXfer (INS ins)
VOID INS_skip_xlate_set (INS ins, BOOL b)
VOID TRACE_ExitsXferToNative (TRACE trace)
VOID INS_SetPinXfer (INS ins)
BOOL INS_IsNativeCall (INS ins)
BOOL INS_IsXlateCall (INS ins)
VOID INS_SetXlateCall (INS ins)
VOID INS_SetNativeCall (INS ins)
BOOL PIN_IsProbeMode ()
BOOL PIN_IsAttaching ()
LOCALFUN BOOL CheckInsSequenceForProbe (INS ins, UINT32 probe_size)
BOOL BBL_InvalidForProbe (BBL bbl)
LOCALFUN BOOL RTN_CheckRtnSizeForProbe (RTN rtn, INS target_ins, BOOL checkForPadding, UINT32 probe_size)
LOCALFUN BOOL ProbeMayOverwriteBranchTarget (INS target_ins, UINT32 probe_size, BOOL *mayOverwriteUnidentifiedBranchTarget)
LOCALFUN PROBE_TAG CheckProbeSafetyStatically (INS ins, RTN rtn, BOOL checkForPadding, UINT32 probe_size)
LOCALFUN PROBE_TAG RTN_IsRelocatable (RTN rtn)
LOCALFUN PROBE_TAG CheckForProbeOverlap (INS ins, USIZE probe_size, BOOL allowPOP)
LOCALFUN PROBE_TAG CheckForSafeProbe (INS ins, BOOL allowPOP, USIZE *probe_size, USIZE suggested_probe_size, PROBE_MODE mode, BOOL checkForPadding)
LOCALFUN BOOL RTN_CheckForSafeProbe (RTN rtn, BOOL allowPOP, PROBE_TAG *tagptr, USIZE *probe_size, USIZE suggested_probe_size, PROBE_MODE mode, BOOL checkForPadding)
BOOL RTN_IsSafeForProbedInsertion (RTN rtn)
BOOL RTN_IsSafeForProbedInsertionEx (RTN rtn, PROBE_MODE mode)
BOOL RTN_IsSafeForProbedReplacement (RTN rtn)
BOOL RTN_IsSafeForProbedReplacementEx (RTN rtn, PROBE_MODE mode)
LOCALFUN IARGLIST CookArguments (va_list argList, ADDRINT instAddress, BOOL addReturnReg)
LOCALFUN IARGLIST CookArgumentsRTN (va_list argList, RTN rtn)
LOCALFUN IARGLIST CookArgumentsINS (va_list argList, INS ins)
LOCALFUN AFUNPTR RTN_ReplaceSignatureProbedImpl (RTN orgRtn, AFUNPTR replacement, PROBE_MODE mode, va_list argList)
AFUNPTR RTN_ReplaceSignatureProbed (RTN replacedRtn, AFUNPTR replacementFun,...)
AFUNPTR RTN_ReplaceSignatureProbedEx (RTN replacedRtn, PROBE_MODE mode, AFUNPTR replacementFun,...)
VOID INS_ReplaceSignatureProbed (INS orgIns, AFUNPTR replacementFunptr,...)
LOCALFUN ADDRINT TRACE_Oaddr (TRACE trace)
AFUNPTR RTN_InsertProbe (RTN rtn, AFUNPTR replacement, PROBE_MODE mode)
LOCALFUN VOID RTN_InsertCallProbedImpl (RTN rtn, IPOINT action, AFUNPTR funptr, PROBE_MODE mode, va_list argList)
VOID RTN_InsertCallProbed (RTN orgRtn, IPOINT action, AFUNPTR funptr,...)
VOID RTN_InsertCallProbedEx (RTN orgRtn, IPOINT action, PROBE_MODE mode, AFUNPTR funptr,...)
LOCALFUN BOOL INS_CheckForProbeInsertion (INS ins)
BOOL PIN_IsSafeForProbedInsertion (ADDRINT addr)
VOID INS_InsertCallProbed (INS orgIns, IPOINT action, AFUNPTR funPtr,...)
VOID PIN_InsertCallProbed (ADDRINT addr, AFUNPTR funptr,...)
INT32 RTN_CodeRangesProbed (RTN rtn, INT32 num, PIN_CODE_RANGE *buffer)
VOID CompleteProbesInstrumentationForCurrentModule (IMG img)
VOID Open_Rtn (RTN rtn)
VOID Close_Rtn (RTN rtn)
PROTO PROTO_Allocate (PARG_T returnArg, CALLINGSTD_TYPE cstype, const char *name,...)
VOID PROTO_Free (PROTO proto)
GLOBALCONST PIN_CALLBACK PIN_CALLBACK_INVALID (0)
VOID VmFunctionNotInitialized ()
LOCALFUN VOID PIN_RemoveToolCallbacks ()
LOCALVAR KNOB< BOOL > KnobProfile (KNOB_MODE_WRITEONCE,"supported:stat","profile","0","print amount of memory dynamically allocated but not yet freed by the tool")
BOOL IsThreadInFiniCallback (OS_THREAD_ID sysId)
LOCALFUN VOID Shutdown (INT32 exitCode)
LOCALFUN VOID DoInstructions (TRACE trace)
LOCALFUN BOOL CheckNoJITCallbacks ()
LOCALFUN BOOL CheckNoProbeCallbacks ()
LOCALINLINE OS_THREAD_ID GetCurrentSysId ()
OS_THREAD_ID GetCurrentSysIdById (THREADID tid)
LOCALVAR KNOB< BOOL > KnobCheckLocks (KNOB_MODE_WRITEONCE,"supported:message","checklocks","1","Check locks are used correctly")
LOCALFUN VOID InitClientLock ()
VOID CheckPinClientLock (const CHAR *funname)
VOID PIN_LockClient ()
VOID PIN_UnlockClient ()
BOOL PIN_TryClientLock ()
BOOL PIN_CallerOwnsClientMutex (OS_THREAD_ID osid)
BOOL PIN_CallerOwnsClientMutex ()
VOID EnterPinClientMasterMode ()
VOID ExitPinClientMasterMode ()
LOCALFUN BOOL TraceWithFunctionReplacement (TRACE trace)
LOCALFUN size_t InstFetcher (void *copyBuf, const VOID *address, size_t maxSizeToCopy, EXCEPTION_INFO *pExceptInfo)
LOCALFUN VOID SetInTraceCallbacks ()
LOCALFUN VOID ReSetInTraceCallbacks ()
BOOL GetInTraceCallbacks ()
VOID CallTraceCallbacks (REGION *region)
INS TraceFirstIns (ADDRINT currTraceAddr)
LOCALFUN VOID CallFinis (INT32 code)
LOCALFUN VOID NotifyOutOfMemory (size_t size)
LOCALFUN VOID NotifyPrepareForFini ()
LOCALFUN ADDRINT PIN_FAST_ANALYSIS_CALL CallMemoryAddrTrans (PIN_MEM_TRANS_INFO *memTransInfo, void *)
LOCALFUN VOID CallForksBefore (THREADID threadId, const CONTEXT *ctxt)
LOCALFUN VOID CallForksAfterInParent (THREADID threadId, const CONTEXT *ctxt)
LOCALFUN VOID CallForksAfterInChild (THREADID threadId, const CONTEXT *ctxt)
VOID DoDetachs ()
VOID NotifyDetachCompletedJitMode ()
LOCALFUN VOID ImageInitializeFirst ()
LOCALFUN VOID CallApplicationStart ()
VOID DoDetachsProbed ()
VOID CallDetachCompletionCallback ()
VOID DoAttachsProbed ()
LOCALFUN VOID InitializeClientTls (THREADID threadIndex)
LOCALFUN VOID DestroyClientTls (THREADID threadIndex)
LOCALFUN VOID CallThreadStarts (THREADID threadIndex, CONTEXT *ctxt, INT32 flags)
LOCALFUN VOID CallThreadFinis (THREADID threadIndex, const CONTEXT *ctxt, INT32 code)
LOCALFUN VOID CallContextChanges (THREADID threadIndex, CONTEXT_CHANGE_REASON reason, const CONTEXT *from, CONTEXT *to, INT32 info)
LOCALFUN VOID CallSyscallEntry (THREADID threadIndex, CONTEXT *ctxt, SYSCALL_STANDARD std)
LOCALFUN VOID CallSyscallExit (THREADID threadIndex, CONTEXT *ctxt, SYSCALL_STANDARD std)
LOCALFUN VOID CallSmcCallbacks (ADDRINT traceStartAddress, ADDRINT traceEndAddress)
LOCALFUN BOOL CallInterceptSignal (THREADID tid, INT32 sig, CONTEXT *ctxt, BOOL hasHandler, const EXCEPTION_INFO *pExceptInfo)
LOCALFUN VOID CallThreadAttachInProbeMode (VOID *sigmask)
LOCALFUN VOID CallThreadDetachInProbeMode ()
LOCALFUN VOID CallThreadAttachInJitMode (THREADID threadIndex, CONTEXT *ctxt)
LOCALFUN VOID CallThreadDetachInJitMode (THREADID threadIndex, const CONTEXT *ctxt)
VOID CallProbesInserted (IMG img)
VOID PIN_WriteErrorMessage (const char *msg, INT32 type, PIN_ERR_SEVERITY_TYPE severity, INT32 num,...)
LOCALFUN VOID DoReplaceFunByNativeCall (INS ins, VOID *v)
LOCALFUN VOID DoInstrumentForFunReplacement (REGION *region, BOOL firstInstIsReplaceable)
AFUNPTR RTN_Replace (RTN replacedRtn, AFUNPTR replacementFun)
AFUNPTR RTN_ReplaceSignature (RTN replacedRtn, AFUNPTR replacementFun,...)
AFUNPTR RTN_ReplaceProbed (RTN replacedRtn, AFUNPTR replacementFun)
AFUNPTR RTN_ReplaceProbedEx (RTN replacedRtn, PROBE_MODE mode, AFUNPTR replacementFun)
VOID CheckNotInCallback (THREADID tid, const char *function)
VOID PIN_CallApplicationFunction (const CONTEXT *ctxt, THREADID tid, CALLINGSTD_TYPE cstype, AFUNPTR origFunPtr, CALL_APPLICATION_FUNCTION_PARAM *param,...)
VOID CallApplicationFunctionUnchecked (const CONTEXT *ctxt, THREADID tid, CALLINGSTD_TYPE cstype, AFUNPTR origFunPtr, CALL_APPLICATION_FUNCTION_PARAM *param,...)
BOOL INS_IsAddedForFunctionReplacement (INS ins)
PIN_DEPRECATED_API VOID PIN_RegisterItcAuxCallBackPushFun (AFUNPTR callBackPushFun)
PIN_DEPRECATED_API VOID RTN_ComplexReplaceWithUninstrumentedRoutine (RTN replacedRtn, AFUNPTR replacementFun)
PIN_DEPRECATED_API ADDRINT PIN_FindAlternateAppStack ()
VOID CALLBACK_SetExecutionPriority (PIN_CALLBACK callback, INT32 priority)
INT32 CALLBACK_GetExecutionPriority (PIN_CALLBACK callback)
PIN_CALLBACK TRACE_AddInstrumentFunction (TRACE_INSTRUMENT_CALLBACK fun, VOID *val)
PIN_CALLBACK INS_AddInstrumentFunction (INS_INSTRUMENT_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddFiniFunction (FINI_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddPrepareForFiniFunction (PREPARE_FOR_FINI_CALLBACK fun, VOID *val)
VOID PIN_AddFetchFunction (FETCH_CALLBACK fun, VOID *val)
size_t PIN_FetchCode (void *copyBuf, const VOID *address, size_t maxSize, EXCEPTION_INFO *pExceptInfo)
VOID PIN_AddOutOfMemoryFunction (OUT_OF_MEMORY_CALLBACK fun, VOID *val)
VOID PIN_AddMemoryAddressTransFunction (MEMORY_ADDR_TRANS_CALLBACK fun, VOID *val)
VOID TRACE_AddSmcDetectedFunction (SMC_CALLBACK fun, VOID *val)
MEMORY_ADDR_TRANS_CALLBACK PIN_GetMemoryAddressTransFunction ()
PIN_CALLBACK PIN_AddDetachFunction (DETACH_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddDetachFunctionProbed (DETACH_PROBED_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddThreadStartFunction (THREAD_START_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddThreadAttachProbedFunction (THREAD_ATTACH_PROBED_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddThreadAttachFunction (THREAD_ATTACH_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddThreadDetachProbedFunction (THREAD_DETACH_PROBED_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddThreadDetachFunction (THREAD_DETACH_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddApplicationStartFunction (APPLICATION_START_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddThreadFiniFunction (THREAD_FINI_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddContextChangeFunction (CONTEXT_CHANGE_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddSyscallEntryFunction (SYSCALL_ENTRY_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddSyscallExitFunction (SYSCALL_EXIT_CALLBACK fun, VOID *val)
BOOL PIN_InterceptSignal (INT32 sig, INTERCEPT_SIGNAL_CALLBACK fun, VOID *val)
BOOL PIN_UnblockSignal (INT32 sig, BOOL enable)
VOID PIN_SetSmcSupport (SMC_ENABLE_DISABLE_TYPE enable_disable)
PIN_CALLBACK PIN_AddProbesInsertedFunction (PROBES_INSERTED_CALLBACK fun, VOID *val)
PIN_CALLBACK PIN_AddForkFunction (FPOINT point, FORK_CALLBACK fun, VOID *val)
VOID PIN_RemoveInstrumentation ()
VOID PIN_RemoveInstrumentationInRange (ADDRINT start, ADDRINT end)
VOID PIN_RemoveFiniFunctions ()
VOID PIN_Detach ()
ATTACH_STATUS PIN_Attach (ATTACH_CALLBACK fun, VOID *val)
VOID PIN_DetachProbed ()
ATTACH_STATUS PIN_AttachProbed (ATTACH_PROBED_CALLBACK fun, VOID *val)
LOCALFUN VOID CheckAndUpdateCondInstState (char const *typeName, CONDINSTSTATE &lastState, CONDINSTSTATE currState)
VOID INS_InsertPredicatedCall (INS ins, IPOINT ipoint, AFUNPTR funptr,...)
VOID INS_InsertCall (INS ins, IPOINT action, AFUNPTR funptr,...)
VOID INS_InsertIfCall (INS ins, IPOINT action, AFUNPTR funptr,...)
VOID INS_InsertThenCall (INS ins, IPOINT action, AFUNPTR funptr,...)
VOID INS_InsertIfPredicatedCall (INS ins, IPOINT action, AFUNPTR funptr,...)
VOID INS_InsertThenPredicatedCall (INS ins, IPOINT action, AFUNPTR funptr,...)
VOID AInsertCall (INS ins, IPOINT ipoint, PREDICATE pred, COND_CALL_TYPE condCallType, AFUNPTR funptr, va_list ap)
VOID AInsertVersionCase (INS ins, REG reg, INT32 case_value, ADDRINT version, va_list ap)
LOCALFUN VOID StartProgram ()
PIN_CONFIGURATION_INFO PIN_CreateDefaultConfigurationInfo ()
VOID PIN_SetAllowedConcurrentCallbacks (PIN_CONFIGURATION_INFO options, PIN_CALLBACK_TYPE callbackType)
VOID PIN_StartProgram (PIN_CONFIGURATION_INFO options=PIN_CreateDefaultConfigurationInfo())
VOID PIN_StartProgramProbed ()
LOCALFUN VOID DumpPinVersion ()
LOCALVAR KNOB_COMMENT KnobPintoolFamily ("pintool","Pin tools switches")
LOCALVAR KNOB_COMMENT KnobGeneralFamily ("supported","General developer switches")
LOCALVAR KNOB_COMMENT KnobBasicFamily ("supported:basic","Basic switches")
LOCALVAR KNOB_COMMENT KnobDebugFamily ("supported:debug","General switches")
LOCALVAR KNOB_COMMENT KnobMessageFamily ("supported:message","Message switches")
LOCALVAR KNOB_COMMENT KnobRegionFamily ("supported:region","Region generation switches")
LOCALVAR KNOB_COMMENT KnobRegAllocFamily ("supported:regalloc","Register allocation switches")
LOCALVAR KNOB< string > KnobLogFile (KNOB_MODE_WRITEONCE,"pintool","logfile","pintool.log","The log file path and file name")
LOCALVAR KNOB< BOOL > KnobUniqueLogFiles (KNOB_MODE_WRITEONCE,"pintool","unique_logfile","0","The log file names will contain the pid")
LOCALVAR KNOB< BOOL > KnobHelp1 (KNOB_MODE_WRITEONCE,"pintool","help","0","Print help message (Return failure of PIN_Init() in order to allow the tool\ to print help message)")
LOCALVAR KNOB< BOOL > KnobHelp2 (KNOB_MODE_WRITEONCE,"pintool","h","0","Print help message (Return failure of PIN_Init() in order to allow the tool\ to print help message)")
KNOB< BOOL > KnobAppendLogFile (KNOB_MODE_WRITEONCE,"supported","append_logfile","0","Append to the end of the log file if it already exists")
MESSAGE_TYPE MessageTypeLogImage ("log_image","", false, false, false, false, LOGTYPE_LOGFILE,"pin log: image API")
MESSAGE_TYPE MessageTypeLogSym ("log_sym","", false, false, false, false, LOGTYPE_LOGFILE,"pin log: symbol API")
MESSAGE_TYPE MessageTypeLogProbe ("log_probe","", false, false, false, false, LOGTYPE_LOGFILE,"pin log: probe information")
MESSAGE_TYPE MessageTypeLogBuffer ("log_buffer","", false, false, false, true, LOGTYPE_LOGFILE,"pin log: buffering")
MESSAGE_TYPE MessageTypeLogUnwind ("log_unwind","", false, false, false, false, LOGTYPE_LOGFILE,"pin log: unwind")
MESSAGE_TYPE MessageTypeLogFetchRtnIns ("log_fetch_rtn_ins","", false, false, false, false, LOGTYPE_LOGFILE,"pin log: fetch rtn ins information")
PIN_DEPRECATED_API BOOL ParseCommandLine (int xargc, CHAR **xargv)
LOCALFUN BOOL PIN_ParseCommandLine (int xargc, CHAR **xargv, BOOL standAlone)
LOCALFUN VOID InitializeCallBacks ()
SECTION_END GLOBALDLLFUN PINCLIENTINT * ClientInt ()
GLOBALDLLCFUN PINCLIENTINT * ClientIntC ()
BOOL PIN_Init (INT32 argc, CHAR **argv)
VOID PIN_SetReplayMode (UINT32 flags)
TRACE TRACE_Allocate (ADDRINT addr)
TRACE TRACE_AllocateForProbe (PROBE_TYPE probeType, ADDRINT addr, RTN rtn, USIZE probeSize, BOOL mustReadAtLeastProbesizeBytes)
ADDRINT TRACE_RelocateOriginalInsAddr (ADDRINT addr)
VOID TRACE_Deallocate (TRACE trace)
RTN TRACE_CodeRtn (TRACE trace)
VOID TRACE_InsertCall (TRACE trace, IPOINT action, AFUNPTR funptr,...)
VOID TRACE_InsertIfCall (TRACE trace, IPOINT action, AFUNPTR funptr,...)
VOID TRACE_InsertThenCall (TRACE trace, IPOINT action, AFUNPTR funptr,...)
BBL TRACE_BblHead (TRACE trace)
BBL TRACE_BblTail (TRACE trace)
ADDRINT TRACE_Address (TRACE trace)
USIZE TRACE_Size (TRACE trace)
RTN TRACE_Rtn (TRACE trace)
BOOL TRACE_HasFallThrough (TRACE trace)
UINT32 TRACE_NumBbl (TRACE trace)
UINT32 TRACE_NumIns (TRACE trace)
VOID BBL_InsertCall (BBL bbl, IPOINT action, AFUNPTR funptr,...)
VOID BBL_InsertIfCall (BBL bbl, IPOINT action, AFUNPTR funptr,...)
VOID BBL_InsertThenCall (BBL bbl, IPOINT action, AFUNPTR funptr,...)
BOOL BBL_HasFallThrough (BBL bbl)
BOOL PIN_SupportsProcessorState (PROCESSOR_STATE state)
BOOL PIN_ContextContainsState (CONTEXT *ctxt, PROCESSOR_STATE state)
VOID PIN_SetContextRegval (CONTEXT *ctxt, REG reg, const UINT8 *val)
VOID PIN_GetContextRegval (const CONTEXT *ctxt, REG reg, UINT8 *val)
VOID PIN_SetContextReg (CONTEXT *ctxt, REG reg, ADDRINT val)
ADDRINT PIN_GetContextReg (const CONTEXT *ctxt, REG reg)
VOID PIN_SetContextFPState (CONTEXT *ctxt, const FPSTATE *fpstate)
VOID PIN_GetContextFPState (const CONTEXT *ctxt, FPSTATE *fpstate)
REGSET PIN_GetFullContextRegsSet ()
VOID PIN_SaveContext (const CONTEXT *ctxtFrom, CONTEXT *ctxtTo)
VOID PIN_ExecuteAt (const CONTEXT *ctxt)
VOID PIN_SetSyscallArgument (CONTEXT *ctxt, SYSCALL_STANDARD std, UINT32 argNum, ADDRINT val)
ADDRINT PIN_GetSyscallArgument (const CONTEXT *ctxt, SYSCALL_STANDARD std, UINT32 argNum)
VOID PIN_SetSyscallNumber (CONTEXT *ctxt, SYSCALL_STANDARD std, ADDRINT val)
ADDRINT PIN_GetSyscallNumber (const CONTEXT *ctxt, SYSCALL_STANDARD std)
ADDRINT PIN_GetSyscallReturn (const CONTEXT *ctxt, SYSCALL_STANDARD std)
ADDRINT PIN_GetSyscallErrno (const CONTEXT *ctxt, SYSCALL_STANDARD std)
VOID PIN_SetPhysicalContextReg (PHYSICAL_CONTEXT *pPhysCtxt, REG reg, ADDRINT val)
ADDRINT PIN_GetPhysicalContextReg (const PHYSICAL_CONTEXT *pPhysCtxt, REG reg)
VOID PIN_SetPhysicalContextFPState (PHYSICAL_CONTEXT *pPhysCtxt, const VOID *fpstate)
VOID PIN_GetPhysicalContextFPState (const PHYSICAL_CONTEXT *pPhysCtxt, VOID *fpstate)
VOID PIN_RaiseException (const CONTEXT *ctxt, THREADID tid, const EXCEPTION_INFO *pExceptInfo)
OS_THREAD_ID PIN_ClientFork ()
BOOL PIN_SpawnApplicationThread (const CONTEXT *ctxt)
LOCALFUN VOID RecordInstructionMutation (INS ins, EXT ext, BOOL noDuplicates)
PIN_DEPRECATED_API BOOL INS_ChangeMemOpToBaseRegisterAddressMode (INS ins, MEMORY_TYPE mtype, REG newBase)
PIN_DEPRECATED_API BOOL INS_RewriteMemoryAddressingToBaseRegisterOnly (INS ins, MEMORY_TYPE mtype, REG newBase)
VOID INS_RewriteMemoryOperand (INS ins, UINT32 memindex, REG reg)
VOID INS_InsertIndirectJump (INS ins, IPOINT ipoint, REG reg)
VOID INS_InsertDirectJump (INS ins, IPOINT ipoint, ADDRINT tgt)
VOID GetVmLock ()
VOID ReleaseVmLock ()
REG PIN_ClaimToolRegister ()
CHAR * PIN_VmFullPath ()
const CHAR * PIN_ToolFullPath ()
BOOL IsProcessExiting ()
NORETURN VOID PIN_ExitProcess (INT32 exitCode)
INT PIN_GetPid ()
VOID INS_Delete (INS ins)
VOID IARGLIST_AddArguments (IARGLIST args,...)
IARGLIST IARGLIST_Alloc ()
VOID IARGLIST_Free (IARGLIST args)
size_t PIN_SafeCopy (VOID *dst, const VOID *src, size_t size)
size_t PIN_SafeCopyEx (VOID *dst, const VOID *src, size_t size, EXCEPTION_INFO *pExceptInfo)
VOID CheckPinInitialized ()
VOID INS_InsertFillBuffer (INS ins, IPOINT action, BUFFER_ID id,...)
VOID INS_InsertFillBufferPredicated (INS ins, IPOINT action, BUFFER_ID id,...)
VOID INS_InsertFillBufferThen (INS ins, IPOINT action, BUFFER_ID id,...)
VOID BBL_InsertFillBuffer (BBL bbl, IPOINT action, BUFFER_ID id,...)
VOID RTN_InsertFillBuffer (RTN rtn, IPOINT action, BUFFER_ID id,...)
VOID * CallBufferFullCallback (BUFFER_ID id, THREADID tid, CONTEXT *ctxt, VOID *buf, UINT64 numElts)
VOID CallAllBufferFullCallbacks (THREADID tid, CONTEXT *ctxt)
BUFFER_ID PIN_DefineTraceBuffer (size_t recordSize, UINT32 numPages, TRACE_BUFFER_CALLBACK fun, VOID *val)
VOID * PIN_AllocateBuffer (BUFFER_ID id)
VOID PIN_DeallocateBuffer (BUFFER_ID id, VOID *buf)
BOOL PIN_IsActionPending (THREADID tid)
UINT32 PIN_GetInitialThreadCount ()
VOID * PIN_GetBufferPointer (CONTEXT *const ctxt, BUFFER_ID id)
BOOL PIN_CheckReadAccess (VOID *addr)
BOOL PIN_CheckWriteAccess (VOID *addr)
ADDRINT PIN_GetAuxVectorValue (ADDRINT type, bool *found)
VOID PIN_ReplaySyscallEntry (THREADID tid, CONTEXT *ctxt, SYSCALL_STANDARD std)
VOID PIN_ReplaySyscallExit (THREADID tid, CONTEXT *ctxt, SYSCALL_STANDARD std)
NORETURN VOID PIN_ExitApplication (INT32 status)
LOCALFUN const char * ContextChangeReasonName (CONTEXT_CHANGE_REASON r)
VOID PIN_ReplayContextChange (THREADID tid, const CONTEXT *from, CONTEXT *to, CONTEXT_CHANGE_REASON reason, INT32 info)
IMG PIN_ReplayImageLoad (const char *imageName, const char *fileName, ADDRINT loadOffset, REPLAY_IMAGE_TYPE imageType)
VOID PIN_ReplayImageUnload (IMG img)
BOOL PIN_WasMemoryReservedInLoadTime ()
PIN_CLIENT_STATE & PinClientState ()
LOCALFUN VOID PinJitApiNotifyEvent (iJIT_JVM_EVENT event_type, void *eventSpecificData)
BOOL PIN_StopApplicationThreads (THREADID tid)
BOOL PIN_IsThreadStoppedInDebugger (THREADID tid)
VOID PIN_ResumeApplicationThreads (THREADID tid)
UINT32 PIN_GetStoppedThreadCount ()
THREADID PIN_GetStoppedThreadId (UINT32 i)
const CONTEXTPIN_GetStoppedThreadContext (THREADID tid)
CONTEXTPIN_GetStoppedThreadWriteableContext (THREADID tid)
OS_THREAD_ID PIN_GetTid ()
THREADID PIN_ThreadId ()
PIN_THREAD_UID PIN_ThreadUid ()
OS_THREAD_ID PIN_GetParentTid ()
VOID PIN_Sleep (UINT32 milliseconds)
VOID PIN_Yield ()
THREADID PIN_SpawnInternalThread (ROOT_THREAD_FUNC *pThreadFunc, VOID *arg, size_t stackSize, PIN_THREAD_UID *pThreadUid)
VOID PIN_ExitThread (INT32 exitCode)
BOOL PIN_IsApplicationThread ()
BOOL PIN_WaitForThreadTermination (const PIN_THREAD_UID &threadUid, UINT32 milliseconds, INT32 *pExitCode)
TLS_KEY PIN_CreateThreadDataKey (DESTRUCTFUN destruct_func)
BOOL PIN_DeleteThreadDataKey (TLS_KEY key)
BOOL PIN_SetThreadData (TLS_KEY key, const VOID *data)
BOOL PIN_SetThreadData (TLS_KEY key, const VOID *data, THREADID threadId)
VOID * PIN_GetThreadData (TLS_KEY key)
VOID * PIN_GetThreadData (TLS_KEY key, THREADID threadId)
VOID BBL_SetTargetVersion (BBL bbl, ADDRINT version)
ADDRINT TRACE_Version (TRACE trace)
VOID INS_InsertVersionCase (INS ins, REG reg, INT32 case_value, ADDRINT version,...)

Variables

LOCALCONST UINT32 crc32table []
LOCALVAR const CHAR * debug_state_func = "_dl_debug_state"
LOCALVAR const CHAR * debug_state_var = "_r_debug"
LOCALTYPE typedef void *(* rbrk_ft )(void)
LOCALVAR BOOL threadInScan = FALSE
LOCALVAR BOOL SymInit = false
LOCALVAR SYMBOL_INFO_MODE SymMode = NO_SYMBOLS
LOCALTYPE typedef pair< string,
ADDRINT > 
SYM_BASIC_INFO
LOCALTYPE typedef set< SYM_BASIC_INFO
>::const_iterator 
SYMSET_CONST_ITERATOR
LOCALVAR const INT PLT0_ENTRY_SIZE = 16
LOCALVAR const INT PLT_ENTRY_SIZE = 16
LOCALVAR const INT RELC_INDEX_OFFSET = 7
struct {
   const string   name
   const string   replacement
   size_t   length
sanitizations []
LOCALTYPE typedef list< INSTR > ILIST
LOCALTYPE typedef map< ADDRINT,
INSTR_INFO > 
IMAP
LOCALVAR IMAP imap
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
FOLLOW_CHILD_PROCESS_CALLBACK
FOLLOW_CHILD_PROCESS_CALLBACKVAL
LOCALTYPE typedef FOLLOW_CHILD_PROCESS_CALLBACKVAL::FUNS FOLLOW_CHILD_PROCESS_CALLBACKVALFUNS
LOCALVAR FOLLOW_CHILD_PROCESS_CALLBACKVALFUNS followChildProcessList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
DEBUG_INTERPRETER_CALLBACK
DEBUG_INTERPRETER_CALLBACKVAL
LOCALTYPE typedef DEBUG_INTERPRETER_CALLBACKVAL::FUNS DEBUG_INTERPRETER_CALLBACKFUNS
LOCALVAR DEBUG_INTERPRETER_CALLBACKFUNS debugInterpreterList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
DEBUG_BREAKPOINT_CALLBACK
DEBUG_BREAKPOINT_CALLBACKVAL
LOCALTYPE typedef DEBUG_BREAKPOINT_CALLBACKVAL::FUNS DEBUG_BREAKPOINT_CALLBACKFUNS
LOCALVAR DEBUG_BREAKPOINT_CALLBACKFUNS debugBreakpointList
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
INTERCEPT_DEBUGGING_EVENT_CALLBACK
INTERCEPT_DEBUGGING_EVENT_CALLBACKVAL
LOCALVAR INTERCEPT_DEBUGGING_EVENT_CALLBACKVAL InterceptDebuggingEventBreakpoint
LOCALVAR INTERCEPT_DEBUGGING_EVENT_CALLBACKVAL InterceptDebuggingEventSingleStep
LOCALVAR INTERCEPT_DEBUGGING_EVENT_CALLBACKVAL InterceptDebuggingEventAsyncBreak
LOCALVAR GET_EMULATED_REGISTER_CALLBACK GetEmulatedRegisterCallback
LOCALVAR SET_EMULATED_REGISTER_CALLBACK SetEmulatedRegisterCallback
LOCALVAR GET_TARGET_DESCRIPTION_CALLBACK GetTargetDescriptionCallback
LOCALVAR VOID * EmulatedRegisterCallbackVal
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
SIGNAL_BEFORE_CALLBACK
SIGNAL_BEFORE_CALLBACKVAL
LOCALTYPE typedef SIGNAL_BEFORE_CALLBACKVAL::FUNS SIGNAL_BEFORE_CALLBACKFUNS
LOCALVAR SIGNAL_BEFORE_CALLBACKFUNS signalBeforeList
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
SIGNAL_AFTER_CALLBACK
SIGNAL_AFTER_CALLBACKVAL
LOCALTYPE typedef SIGNAL_AFTER_CALLBACKVAL::FUNS SIGNAL_AFTER_CALLBACKFUNS
LOCALVAR SIGNAL_AFTER_CALLBACKFUNS signalAfterList
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
THREAD_BEGIN_CALLBACK
THREAD_BEGIN_CALLBACKVAL
LOCALTYPE typedef THREAD_BEGIN_CALLBACKVAL::FUNS THREAD_BEGIN_CALLBACKFUNS
LOCALVAR THREAD_BEGIN_CALLBACKFUNS threadBeginList
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
THREAD_END_CALLBACK
THREAD_END_CALLBACKVAL
LOCALTYPE typedef THREAD_END_CALLBACKVAL::FUNS THREAD_END_CALLBACKFUNS
LOCALVAR THREAD_END_CALLBACKFUNS threadEndList
LOCALTYPE typedef std::map<
int, SIGNAL_INTERCEPT_CALLBACK
SIGNAL_INTERCEPT_MAP
LOCALVAR SIGNAL_INTERCEPT_MAP signalInterceptMap
LOCALTYPE typedef pair< RTN_KEY,
RTN > 
RTN_PAIR
LOCALTYPE typedef map< RTN_KEY,
RTN > 
RTN_MAP
LOCALVAR RTN_MAP rtn_map
LOCALTYPE typedef list< MemRange > RTN_OUTSIDE_RANGES_LIST
LOCALTYPE typedef map< ADDRINT,
OUTSIDE_TARGET_MEM_RANGE,
std::less< ADDRINT > > 
RTN_OUTSIDE_RANGES_MAP
LOCALTYPE typedef map< ADDRINT,
OUTSIDE_TARGET, std::less<
ADDRINT > > 
RTN_OUTSIDE_TARGETS_MAP
LOCALTYPE typedef map< ADDRINT,
BBL, std::less< ADDRINT > > 
RTN_OUTSIDE_PREV_BBLS_MAP
LOCALTYPE typedef vector<
INS > 
RTN_UJMP_VECTOR
LOCALVAR const char * WHOLE_TEXT_SECTION = ".text"
LOCALVAR const char * UNNAMED_IMAGE_ENTRY_POINT = "unnamedImageEntryPoint"
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
IMAGECALLBACK
IMAGECALLBACKVAL
LOCALTYPE typedef IMAGECALLBACKVAL::FUNS IMAGECALLBACKFUNS
LOCALVAR IMAGECALLBACKFUNS imageLoadList
LOCALVAR IMAGECALLBACKFUNS imageUnloadList
LOCALVAR APP app
LOCALVAR RTN OpenRtn
LOCALVAR IMG OpenImg
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
RTN_INSTRUMENT_CALLBACK
RTN_INSTRUMENT_CALLBACKVAL
LOCALTYPE typedef RTN_INSTRUMENT_CALLBACKVAL::FUNS RTN_INSTRUMENT_CALLBACKFUNS
LOCALVAR RTN_INSTRUMENT_CALLBACKFUNS rtnList
LOCALVAR std::list< IMAGE_LOAD_OP > savedImageLoadOps
LOCALVAR std::list< IMAGE_LOAD_OP2 > savedImageLoadOps2
GLOBALCONST UINT32 MAX_IEH_CALLBACKS = 32
LOCALVAR PINVM::PINSYNC_RWLOCK syscallCallbacksRWLock
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
INS_INSTRUMENT_CALLBACK
INS_INSTRUMENT_CALLBACKVAL
LOCALTYPE typedef INS_INSTRUMENT_CALLBACKVAL::FUNS INS_INSTRUMENT_CALLBACKFUNS
LOCALVAR INS_INSTRUMENT_CALLBACKFUNS insList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
TRACE_INSTRUMENT_CALLBACK
TRACE_INSTRUMENT_CALLBACKVAL
LOCALTYPE typedef TRACE_INSTRUMENT_CALLBACKVAL::FUNS TRACE_INSTRUMENT_CALLBACKFUNS
LOCALVAR TRACE_INSTRUMENT_CALLBACKFUNS traceList
LOCALVAR OUT_OF_MEMORY_CALLBACK outOfMemoryFun = 0
LOCALVAR VOID * outOfMemoryVal = 0
LOCALVAR MEMORY_ADDR_TRANS_CALLBACK memoryAddrTransFun = 0
LOCALVAR VOID * memoryAddrTransVal = 0
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
SMC_CALLBACK
SMC_CALLBACKVAL
LOCALTYPE typedef SMC_CALLBACKVAL::FUNS SMC_CALLBACKFUNS
LOCALVAR SMC_CALLBACKFUNS smcCallbackList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
PREPARE_FOR_FINI_CALLBACK
PREPARE_FOR_FINI_CALLBACKVAL
LOCALTYPE typedef PREPARE_FOR_FINI_CALLBACKVAL::FUNS PREPARE_FOR_FINI_CALLBACKFUNS
LOCALVAR PREPARE_FOR_FINI_CALLBACKFUNS prepareForFiniList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
FINI_CALLBACK
FINI_CALLBACKVAL
LOCALTYPE typedef FINI_CALLBACKVAL::FUNS FINI_CALLBACKFUNS
LOCALVAR FINI_CALLBACKFUNS finiList
LOCALVAR FETCH_CALLBACK fetchCallbackFun = 0
LOCALVAR VOID * fetchCallbackVal = 0
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
FORK_CALLBACK
FORK_CALLBACKVAL
LOCALTYPE typedef FORK_CALLBACKVAL::FUNS FORK_CALLBACKFUNS
LOCALVAR FORK_CALLBACKFUNS forkListBefore
LOCALVAR FORK_CALLBACKFUNS forkListAfterInParent
LOCALVAR FORK_CALLBACKFUNS forkListAfterInChild
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
DETACH_CALLBACK
DETACH_CALLBACKVAL
LOCALTYPE typedef DETACH_CALLBACKVAL::FUNS DETACH_CALLBACKFUNS
LOCALVAR DETACH_CALLBACKFUNS detachList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
DETACH_PROBED_CALLBACK
DETACH_PROBED_CALLBACKVAL
LOCALTYPE typedef DETACH_PROBED_CALLBACKVAL::FUNS DETACH_PROBED_CALLBACKFUNS
LOCALVAR DETACH_PROBED_CALLBACKFUNS detachProbedList
LOCALVAR ATTACH_PROBED_CALLBACK attachProbedFun = 0
LOCALVAR VOID * attachProbedVal = 0
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
APPLICATION_START_CALLBACK
APPLICATION_START_CALLBACKVAL
LOCALTYPE typedef APPLICATION_START_CALLBACKVAL::FUNS APPLICATION_START_CALLBACKFUNS
LOCALVAR APPLICATION_START_CALLBACKFUNS appStartList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
THREAD_START_CALLBACK
THREAD_START_CALLBACKVAL
LOCALTYPE typedef THREAD_START_CALLBACKVAL::FUNS THREAD_START_CALLBACKFUNS
LOCALVAR THREAD_START_CALLBACKFUNS threadStartList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
THREAD_ATTACH_PROBED_CALLBACK
THREAD_ATTACH_PROBED_CALLBACKVAL
LOCALTYPE typedef THREAD_ATTACH_PROBED_CALLBACKVAL::FUNS THREAD_ATTACH_PROBED_CALLBACKFUNS
LOCALVAR THREAD_ATTACH_PROBED_CALLBACKFUNS threadAttachProbedList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
THREAD_DETACH_PROBED_CALLBACK
THREAD_DETACH_PROBED_CALLBACKVAL
LOCALTYPE typedef THREAD_DETACH_PROBED_CALLBACKVAL::FUNS THREAD_DETACH_PROBED_CALLBACKFUNS
LOCALVAR THREAD_DETACH_PROBED_CALLBACKFUNS threadDetachProbedList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
THREAD_ATTACH_CALLBACK
THREAD_ATTACH_CALLBACKVAL
LOCALTYPE typedef THREAD_ATTACH_CALLBACKVAL::FUNS THREAD_ATTACH_CALLBACKFUNS
LOCALVAR THREAD_ATTACH_CALLBACKFUNS threadAttachJitList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
THREAD_DETACH_CALLBACK
THREAD_DETACH_CALLBACKVAL
LOCALTYPE typedef THREAD_DETACH_CALLBACKVAL::FUNS THREAD_DETACH_CALLBACKFUNS
LOCALVAR THREAD_DETACH_CALLBACKFUNS threadDetachJitList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
THREAD_FINI_CALLBACK
THREAD_FINI_CALLBACKVAL
LOCALTYPE typedef THREAD_FINI_CALLBACKVAL::FUNS THREAD_FINI_CALLBACKFUNS
LOCALVAR THREAD_FINI_CALLBACKFUNS threadFiniList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
CONTEXT_CHANGE_CALLBACK
CONTEXT_CHANGE_CALLBACKVAL
LOCALTYPE typedef CONTEXT_CHANGE_CALLBACKVAL::FUNS CONTEXT_CHANGE_CALLBACKFUNS
LOCALVAR CONTEXT_CHANGE_CALLBACKFUNS contextChangeList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
SYSCALL_ENTRY_CALLBACK
SYSCALL_ENTRY_CALLBACKVAL
LOCALTYPE typedef SYSCALL_ENTRY_CALLBACKVAL::FUNS SYSCALL_ENTRY_CALLBACKFUNS
LOCALVAR SYSCALL_ENTRY_CALLBACKFUNS syscallEntryList
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
SYSCALL_EXIT_CALLBACK
SYSCALL_EXIT_CALLBACKVAL
LOCALTYPE typedef SYSCALL_EXIT_CALLBACKVAL::FUNS SYSCALL_EXIT_CALLBACKFUNS
LOCALVAR SYSCALL_EXIT_CALLBACKFUNS syscallExitList
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
INTERCEPT_SIGNAL_CALLBACK
INTERCEPT_SIGNAL_CALLBACKVAL
LOCALTYPE typedef std::map<
int, INTERCEPT_SIGNAL_CALLBACKVAL > 
INTERCEPT_SIGNAL_MAP
LOCALVAR INTERCEPT_SIGNAL_MAP interceptSignalMap
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
PROBES_INSERTED_CALLBACK
PROBES_INSERTED_CALLBACKVAL
LOCALTYPE typedef PROBES_INSERTED_CALLBACKVAL::FUNS PROBES_INSERTED_CALLBACKFUNS
LOCALVAR PROBES_INSERTED_CALLBACKFUNS probesInsertedList
LOCALTYPE typedef SIMPLE_CALLBACKVAL<
TRACE_BUFFER_CALLBACK
TRACE_BUFFER_CALLBACKVAL
LOCALTYPE typedef std::map<
BUFFER_ID, TRACE_BUFFER_CALLBACKVAL > 
TRACE_BUFFER_CALLBACK_MAP
LOCALVAR TRACE_BUFFER_CALLBACK_MAP traceBufferCallbackMap
LOCALTYPE typedef COMPLEX_CALLBACKVAL<
DEBUG_INTERPRETER_CALLBACK
DEBUG_INTERPRETER_CALLBACKVAL
LOCALTYPE typedef DEBUG_INTERPRETER_CALLBACKVAL::FUNS DEBUG_INTERPRETER_CALLBACKFUNS
LOCALVAR DEBUG_INTERPRETER_CALLBACKFUNS debugInterpreterList
LOCALVAR set< ADDRINT, less<
ADDRINT > > 
addrReferences
LOCALVAR UINT32 replayModeFlags
LOCALVAR INT32 ToolArgc
LOCALVAR CHAR ** ToolArgv
LOCALVAR PIN_CONFIGURATION pinStartOptions
LOCALVAR volatile BOOL processExiting = FALSE
LOCALVAR OS_THREAD_ID IdOfThreadInFiniCallback = 0
LOCALVAR PIN_CLIENT_MUTEX PinClientMutex
LOCALVAR BOOL inTraceCallbacks = FALSE
LOCALVAR REPLACEDFUN::LIST replacedFunList
LOCALVAR CONDINSTSTATE condInstStateForIns = CONDINST_NORMAL
LOCALVAR PREDICATE insLastIfPredicate = PREDICATE_ALWAYS_TRUE
LOCALVAR PINCLIENTINT ClientIntData
LOCALVAR CONDINSTSTATE condInstStateForTrace = CONDINST_NORMAL
LOCALVAR CONDINSTSTATE condInstStateForBbl = CONDINST_NORMAL
GLOBALCONST UINT32 MAX_CLIENT_TLS_KEYS = (TLS_KEY_CLIENT_LAST - TLS_KEY_CLIENT_FIRST + 1)
LOCALTYPE typedef TLS_KEY_ALLOCATOR<
TLS_KEY_CLIENT_FIRST, TLS_KEY_CLIENT_LAST > 
CLIENT_TLS_KEY_ALLOCATOR
LOCALVAR CLIENT_TLS_KEY_ALLOCATORpClientTlsKeyAllocator


Detailed Description

PIN DWARF debugging information using libpindwarf (LLVM based) library


Typedef Documentation

typedef map<ADDRINT, USIZE> LEVEL_PINCLIENT::CODE_RANGES
 

Map of code ranges in image. Key is base address of code range, Value is size of the range.

typedef VOID(* LEVEL_PINCLIENT::GET_EMULATED_REGISTER_CALLBACK)(unsigned toolRegId, THREADID tid, CONTEXT *ctxt, VOID *data, VOID *v)
 

Call-back function that Pin calls to get the value of a register emulated by the tool.

Parameters:
[in] toolRegId Identifies the emulated register (from the registerDescriptions parameter to PIN_AddDebuggerRegisterEmulator()).
[in] tid Identifies the thread whose register is read.
[in] ctxt Architected register state for the thread.
[out] data Points to a buffer that receives the value of the register. The value must be stored in little-endian format (least significant bytes first). If the register size is not an even multiple of bytes, the upper bits of the last byte (most significant byte) are unused. If the register size is 2, 4, or 8 bytes, data is naturally aligned, so it may be cast to a pointer of the appropriate type.
[in] v The tool's call-back value.

typedef USIZE(* LEVEL_PINCLIENT::GET_TARGET_DESCRIPTION_CALLBACK)(const std::string &name, USIZE size, VOID *buf, VOID *v)
 

Call-back function that Pin calls to get the content of a document that describes an emulated target processor to an application-level debugger. This is useful, for example, when a Pin tool emulates additional registers beyond those defined by the native CPU. A debugger can use this document to understand the emulated registers and how to display them.

The format of the returned document varies depending on the debugger that is connected to Pin. Tools can use PIN_GetDebuggerType() to tell which debugger is connected.

When used with GDB, the description should be an XML "target feature" document, as described in the GDB user manual, "Debugging With GDB". See the appendix titled "Target Descriptions" for details of the XML document format. GDB starts by asking for a document titled "target.xml". However, this document may reference other documents via "include" statements. If so, GDB will ask for those additional documents by their names.

Parameters:
[in] name The name of the requested document.
[in] size Size (bytes) of the buf buffer.
[out] buf Points to a buffer that receives the content of the document. If the document requires more than size bytes, the tool need not write anything into buf. Instead, the tool should return the required size.
[in] v The tool's call-back value.
Returns:
If the tool knows how to provide the document named name, it returns the size (bytes) of that document. If that size is less than or equal to size, the tool should also write the content of the document to buf. If the tool does not know how to provide this document, it should return zero.

typedef BOOL(* LEVEL_PINCLIENT::INTERCEPT_DEBUGGING_EVENT_CALLBACK)(THREADID tid, DEBUGGING_EVENT eventType, CONTEXT *ctxt, VOID *arg)
 

Call-back function when the tool intercepts a debugging event with PIN_InterceptDebuggingEvent().

Parameters:
[in] tid The Pin thread ID of the thread that received the debugging event.
[in] eventType Tells the debugging event.
[in,out] ctxt On input, gives the register state at the point the thread received the event. The tool may change ctxt. If the event is passed on to the debugger, the debugger sees the modified register state. If the event is not passed on to the debugger, the thread resumes execution at the new register state.
[in] arg The tool's call-back value.
Returns:
Returning TRUE tells Pin to pass the debugging event on to the debugger. Returning FALSE tells Pin to squash the event and the thread resumes without stopping in the debugger.
The following scenarios are not allowed:

  • The call-back may not return FALSE for DEBUGGING_EVENT_ASYNC_BREAK.
  • If the call-back returns TRUE for DEBUGGING_EVENT_BREAKPOINT or DEBUGGING_EVENT_SINGLE_STEP, it may not change the value of REG_INST_PC in ctxt. This restriction exists because debuggers typically make assumptions on the PC value when these events trigger.

typedef VOID(* LEVEL_PINCLIENT::SET_EMULATED_REGISTER_CALLBACK)(unsigned toolRegId, THREADID tid, CONTEXT *ctxt, const VOID *data, VOID *v)
 

Call-back function that Pin calls to set the value of a register emulated by the tool.

Parameters:
[in] toolRegId Identifies the emulated register (from the registerDescriptions parameter to PIN_AddDebuggerRegisterEmulator()).
[in] tid Identifies the thread whose register is written.
[in] ctxt Architected register state for the thread.
[in] data Points to the new value for the register. The value is stored in the same format as described in GET_EMULATED_REGISTER_CALLBACK.
[in] v The tool's call-back value.

typedef map<SYM, ADDRINT> LEVEL_PINCLIENT::SYM_RESOLVER_VS_ACTUAL_ADDRESS_IFUNC_MAP
 

This map is used during the ifunc symbol processing. It maps between ifunc symbol names and the actual function addresses which doesn't have a symbol associated with them.

typedef VOID(* LEVEL_PINCLIENT::TRACEGENCODE_CALLBACK)(TRACE trace, VOID *v)
 

Call back function when Pin has to generate a rogue trace for an exit


Enumeration Type Documentation

anonymous enum
 

Keys to access client data in the thread local storage

enum LEVEL_PINCLIENT::IMAGE_LOAD_FLAGS
 

Names for flags to construct the arguments to ProcessImageLoad and ImgLoad Without these you get a list of cryptic BOOL arguments; by using these you see what the arguments being passed mean.

Enumerator:
IMAGE_LOAD_MAINEXECUTABLE  Set for the main executable.
IMAGE_LOAD_FOUNDINMEMORY  Set if the image was found in memory during Pin initalization (only Windows at present)
IMAGE_LOAD_RUNTIME  Set if the image was loaded at runtime.
IMAGE_LOAD_TEXTFROMIMAGE  Set if RTNs should get their code from Pin's copy of the image, rather than the one mapped by the OS. (For replay where the OS' one may not exist yet).
IMAGE_LOAD_INTERPRETER  Set for the program's interpreter (loader).

enum LEVEL_PINCLIENT::REPLAY_IMAGE_TYPE
 

Image types for PIN_ReplayImageLoad()

Enumerator:
REPLAY_IMAGE_TYPE_REGULAR  Regular image.
REPLAY_IMAGE_TYPE_MAIN_EXE  Main executable image.
REPLAY_IMAGE_TYPE_INTERPRETER  The image of the interpreter (loader).

enum LEVEL_PINCLIENT::REPLAY_MODE
 

Flags passed to PIN_SetReplayMode.

Enumerator:
REPLAY_MODE_IMAGEOPS  Replayer will handle image ops.


Function Documentation

VOID LEVEL_PINCLIENT::AInsertCall INS  ins,
IPOINT  ipoint,
PREDICATE  pred,
COND_CALL_TYPE  condCallType,
AFUNPTR  funptr,
va_list  ap
 

If "condFun" is non-zero, then this analysis call will be invoked only if condFun (which is an analysis function called immediately before "funptr") returns a non-zero value.

Availability:
Mode: JIT
O/S: Linux, Windows & OS X*
CPU: All

VOID LEVEL_PINCLIENT::AInsertVersionCase INS  ins,
REG  reg,
INT32  case_value,
ADDRINT  version,
va_list  ap
 

Availability:
Mode: JIT
O/S: Linux, Windows & OS X*
CPU: All

BOOL LEVEL_PINCLIENT::AotiInstrumentationExists  ) 
 

TRUE if there are any AOTI requests. Only used for an assertion to check that all AOTI has been cleared when all images are unloaded.

VOID LEVEL_PINCLIENT::AotiPlaybackCall INS  ins  ) 
 

x internal

VOID LEVEL_PINCLIENT::AotiRecordCall IPOINT  action,
INS  ins,
ACALL const *  acall
 

x internal

VOID LEVEL_PINCLIENT::AotiRecordMutation INS  ins,
EXT  ext
 

x internal

VOID LEVEL_PINCLIENT::AotiRemoveImageInstrumentation IMG  img  ) 
 

Remove any AOTI that has been applied to instructions in the given image.

VOID LEVEL_PINCLIENT::BBL_InsertFillBuffer BBL  bbl,
IPOINT  action,
BUFFER_ID  id,
  ...
 

Insert analysis code to fill one record in a trace buffer, relative to a BBL.

Parameters:
[in] bbl The application BBL
[in] action Whether the record is filled before or after the BBL
[in] id The ID of the buffer whose record is filled
[in] ... IARG_TYPE. Additional arguments to specify the fields of the trace buffer.
Certain IARG_TYPEs cannot be used with the *_InsertFillBuffer APIs. The unsupported IARG_TYPEs are: IARG_CONTEXT, IARG_REG_REFERENCE, and IARG_REG_CONST_REFERENCE.

Availability:
Mode: JIT
O/S: Linux & Windows
CPU: IA-32 and Intel(R) 64 architectures

BOOL LEVEL_PINCLIENT::BBL_InvalidForProbe BBL  bbl  ) 
 

This routine tests whether the basic block can be replaced with probe The function return TRUE when the basic block has a problem

  • bb size < probe size
  • a call instruction is inside bbl and its return address is inside the probe

BBL_TYPE LEVEL_PINCLIENT::BBL_Type BBL  x  ) 
 

Returns:
The type of the basic block

VOID LEVEL_PINCLIENT::CallAllBufferFullCallbacks THREADID  tid,
CONTEXT ctxt
 

Calls all of the buffer full functions in turn. Generally, this is useful when a thread terminates, since that's the only time we definitely will call all of the buffer full callbacks.

VOID LEVEL_PINCLIENT::CallApplicationFunctionUnchecked const CONTEXT ctxt,
THREADID  tid,
CALLINGSTD_TYPE  cstype,
AFUNPTR  origFunPtr,
CALL_APPLICATION_FUNCTION_PARAM param,
  ...
 

Equivalent version of PIN_CallApplicationFunction() to be used internally by Pin. This function doesn't perform the checks that PIN_CallApplicationFunction() does so it allows Pin to call an application function in cases where Pin tool cannot. We assume here that if you call this function then you know what you're doing.

Parameters:
[in] ctxt The application register state to use when calling the function. Pin changes the register state in order to pass arguments to the function, but the ctxt parameter isn't changed.
[in] tid The Pin id of the current thread (see IARG_THREAD_ID).
[in] cstype The calling standard used for calling this function (CALLINGSTD_DEFAULT recommended).
[in] origFunPtr The entry point of the application function.
[in] param Additional parameters to define the exact behavior of this function invocation (or NULL for using the defaults). See CALL_APPLICATION_FUNCTION_PARAM .
[in] ... List of function argument type and size.

LOCALFUN VOID LEVEL_PINCLIENT::CallApplicationStart  ) 
 

  • Notify VM about application start
  • Call application start callback functions

LOCALFUN BOOL LEVEL_PINCLIENT::CallBreakpointHandlers ADDRINT  addr,
USIZE  size,
BOOL  insert
 

Call any breakpoint handlers to handle a breakpoint set/delete command.

Parameters:
[in] addr The address of the requested breakpoint.
[in] size The size of the breakpoint (HW/SW)
[in] insert Whether if this is a breakpoint insertion or deletion.
Returns:
TRUE if any handler takes control over the breakpoint.

VOID* LEVEL_PINCLIENT::CallBufferFullCallback BUFFER_ID  id,
THREADID  tid,
CONTEXT ctxt,
VOID *  buf,
UINT64  numElts
 

Calls the buffer full function (as specified by PIN_DefineTraceBuffer) when either the buffer is full or the thread terminates.

Parameters:
[in] id The ID of the trace buffer.
[in] tid The ID of the thread whose buffer filled
[in] buf Pointer to the base of the filled buffer
[in] numElts Number of elements in buffer

LOCALFUN VOID LEVEL_PINCLIENT::CallContextChanges THREADID  threadIndex,
CONTEXT_CHANGE_REASON  reason,
const CONTEXT from,
CONTEXT to,
INT32  info
 

Call context change callbacks.

LOCALFUN BOOL LEVEL_PINCLIENT::CallDebugInterpreters THREADID  threadIndex,
CONTEXT ctxt,
const char *  cmd,
const char **  reply
 

Call any debug interpreters to handle a debugger command.

Parameters:
[in] threadIndex Pin thread ID of debugger focus thread.
[in] ctxt Application register state of focus thread, which could be changed.
[in] cmd Debugger command.
[out] reply Receives a pointer to the command's response, if it is handled.
Returns:
TRUE if any interpreter handles cmd.

VOID LEVEL_PINCLIENT::CallDetachCompletionCallback  ) 
 

Call detach probed completion callbacks. When this callback function is called, it is guaranteed that Pin removed all probes from the application code and that no other callback function will be called afterwards (except from additional Detach callback functions).

LOCALFUN VOID LEVEL_PINCLIENT::CallFinis INT32  code  ) 
 

x

LOCALFUN BOOL LEVEL_PINCLIENT::CallFollowChildProcess CHILD_PROCESS  childProcess,
const char **  toolAppend
 

Call Follow child process callback

Parameters:
[in] childProcess Child process handle
[out] toolAppend If Pin should automatically add the "KnobAppendLogFile" switch to the tool's command line, toolAppend is set to the name of that switch. If the switch should not be automatically added, it is set to NULL.
Returns:
TRUE If user is interested to inject Pin (and tool) into child/exec-ed process
FALSE If user is not interested to inject Pin (and tool) into child/exec-ed process

LOCALFUN VOID LEVEL_PINCLIENT::CallForksAfterInChild THREADID  threadId,
const CONTEXT ctxt
 

notify child after fork

LOCALFUN VOID LEVEL_PINCLIENT::CallForksAfterInParent THREADID  threadId,
const CONTEXT ctxt
 

notify parent after fork

LOCALFUN VOID LEVEL_PINCLIENT::CallForksBefore THREADID  threadId,
const CONTEXT ctxt
 

notify before fork

LOCALFUN BOOL LEVEL_PINCLIENT::CallInterceptedDebuggingEvent THREADID  tid,
DEBUGGING_EVENT  eventType,
CONTEXT ctxt
 

Call a client debugging event interceptor function.

Parameters:
[in] tid Thread that received the debugging event.
[in] eventType Tells the debugging event.
[in,out] ctxt Register state when the event was received, which the tool can modify.
Returns:
TRUE tells Pin to pass the even on to the debugger, FALSE tells Pin to squash the event.
Note:
The pin client lock is obtained during the call of this API.

LOCALFUN BOOL LEVEL_PINCLIENT::CallInterceptSignal THREADID  tid,
INT32  sig,
CONTEXT ctxt,
BOOL  hasHandler,
const EXCEPTION_INFO pExceptInfo
 

Call signal "intercept" callbacks. Returns TRUE if signal should be passed on to the application.

LOCALFUN ADDRINT PIN_FAST_ANALYSIS_CALL LEVEL_PINCLIENT::CallMemoryAddrTrans PIN_MEM_TRANS_INFO *  memTransInfo,
void * 
 

Tools callback function to tell PIN to use a different memory address.

VOID LEVEL_PINCLIENT::CallProbesInserted IMG  img  ) 
 

Call callbacks when Pin is done inserting probes.

VOID LEVEL_PINCLIENT::CallRtnCallbacks RTN  rtn  ) 
 

Calls all rtn callbacks for given routine

LOCALFUN VOID LEVEL_PINCLIENT::CallSmcCallbacks ADDRINT  traceStartAddress,
ADDRINT  traceEndAddress
 

Call SMC callbacks.

LOCALFUN VOID LEVEL_PINCLIENT::CallSyscallEntry THREADID  threadIndex,
CONTEXT ctxt,
SYSCALL_STANDARD  std
 

Call syscall entry callbacks.

LOCALFUN VOID LEVEL_PINCLIENT::CallSyscallExit THREADID  threadIndex,
CONTEXT ctxt,
SYSCALL_STANDARD  std
 

Call syscall exit callbacks.

LOCALFUN VOID LEVEL_PINCLIENT::CallThreadAttachInJitMode THREADID  threadIndex,
CONTEXT ctxt
 

Call attached thread callback in JIT mode

Note:
The pin client lock is obtained during the call of this API.

LOCALFUN VOID LEVEL_PINCLIENT::CallThreadAttachInProbeMode VOID *  sigmask  ) 
 

Call attached thread callback in probe mode

LOCALFUN VOID LEVEL_PINCLIENT::CallThreadDetachInJitMode THREADID  threadIndex,
const CONTEXT ctxt
 

Call detach thread callback in JIT mode

Note:
The pin client lock is obtained during the call of this API.

LOCALFUN VOID LEVEL_PINCLIENT::CallThreadDetachInProbeMode  ) 
 

Call detach thread callback in probe mode

Note:
The pin client lock is obtained during the call of this API.

LOCALFUN VOID LEVEL_PINCLIENT::CallThreadFinis THREADID  threadIndex,
const CONTEXT ctxt,
INT32  code
 

Call Thread Fini callbacks

LOCALFUN VOID LEVEL_PINCLIENT::CallThreadStarts THREADID  threadIndex,
CONTEXT ctxt,
INT32  flags
 

Call Thread Start callbacks

VOID LEVEL_PINCLIENT::CallTraceCallbacks REGION *  region  ) 
 

Walk the list of trace instrumentors and call them

LOCALFUN PROBE_TAG LEVEL_PINCLIENT::CheckForProbeOverlap INS  ins,
USIZE  probe_size,
BOOL  allowPOP
 

CheckForProbeOverlap - Tests if a probe already exists for a code location

Parameters:
ins the instruction where the probe should be inserted
probe_size the size of the probe
allowPOP is POP (probe on probe) allowed
Returns:
tag which indicates whether code location can be probed Possible values: PROBE_TAG_OK PROBE_TAG_PREV_PROBE

LOCALFUN PROBE_TAG LEVEL_PINCLIENT::CheckForSafeProbe INS  ins,
BOOL  allowPOP,
USIZE *  probe_size,
USIZE  suggested_probe_size,
PROBE_MODE  mode,
BOOL  checkForPadding
 

Makes the various probe tests.

Parameters:
ins The instruction where the probe should be inserted
allowPOP Probe on probe is allowed
probe_size An output parameter. The size of the probe that was tested for safety.
suggested_probe_size A suggested probe size. If USIZE_INVALID() is passed then PIN will choose the smaller probe size (6 bytes)
mode The probe mode (PROBE_MODE_DEFAULT /PROBE_MODE_ALLOW_RELOCATION)
checkForPadding Check that the bytes which follow the first RTN_Size bytes up to the RTN_Range are all nops
Returns:
tag The PROBE_TAG is set to describe why the function cannot be probed, or PROBE_OK or PROBE_RELOCATABLE.

VOID LEVEL_PINCLIENT::CheckNotInCallback THREADID  tid,
const char *  function
 

Check that a Pin client user interface call has been made from an analysis function, not a callback.

Parameters:
tid Thread ID of the thread making the call
function Name of the interface function being called
Availability:
Mode: JIT
O/S: Linux, Windows, BSD
CPU: All

VOID LEVEL_PINCLIENT::CheckPinClientLock const CHAR *  funname  ) 
 

Check that we have the client lock.

Availability:
Mode: JIT & Probe
O/S: Linux, Windows & OS X*
CPU: All

VOID LEVEL_PINCLIENT::CheckPinInitialized  ) 
 

Raise an error if pin has not been initialized. Call this from pin api functions to ensure that PIN_Init() has been called first.

LOCALFUN PROBE_TAG LEVEL_PINCLIENT::CheckProbeSafetyStatically INS  ins,
RTN  rtn,
BOOL  checkForPadding,
UINT32  probe_size
 

CheckProbeSafetyStatically - Tests if the given RTN is a candidate for function insertion using probes.

Parameters:
ins the instruction where the probe should be inserted
rtn the routine to be checked for replacement
checkForPadding checkForPadding rtn boundaries to its annotated size, otherwise next SYM address defines the size.
Returns:
tag which indicates whether function can be probed. Possible values: PROBE_TAG_OK PROBE_TAG_TOO_SMALL PROBE_TAG_BRANCH_TARGET PROBE_TAG_POSSIBLE_UNIDENTIFIED_BRANCH_TARGET PROBE_TAG_RUNTIME_FIXUP

SECTION_END GLOBALDLLFUN PINCLIENTINT* LEVEL_PINCLIENT::ClientInt  ) 
 

x

GLOBALDLLCFUN PINCLIENTINT* LEVEL_PINCLIENT::ClientIntC  ) 
 

x

VOID LEVEL_PINCLIENT::Close_Rtn RTN  rtn  ) 
 

Close the given RTN.

VOID LEVEL_PINCLIENT::CompleteImageLoad IMG  img,
void *  arg
 

When the application loads a new image, do some bookkeeping.

VOID LEVEL_PINCLIENT::CompleteProbesInstrumentationForCurrentModule IMG  img  ) 
 

In probes mode, if the user inserted any calls, generate the code now. This was not done during ImageLoad() because users can insert several calls on one RTN. This method restricts users to inserting probes in ImageLoad(). This is OK, because it is the only thread- safe place to do it.

Register all unwind frames

VOID LEVEL_PINCLIENT::CookRegsym IMG  img,
SYM_RESOLVER_VS_ACTUAL_ADDRESS_IFUNC_MAP *  sym_resolver_vs_actual_address_ifunc_map
 

cook .symtab, like IMG_CookRegsym, but less error checking so it won't assert on valid images name_vs_actual_address_ifunc_map is a temporary data structure which is used during the processing of ifunc symbols. Contains only ifunc symbols that their corresponding actual function addresses don't have a symbol which is associated with them. This map will be processed afterwards by the function: "CreateRtnOriginatedFromIfunc", where an rtn object will be created for each instance in the map.

VOID LEVEL_PINCLIENT::DebuggerClientInitialize  ) 
 

Initialize the client library call-backs for the application-level debugger API's.

VOID LEVEL_PINCLIENT::DeprecatedCallSignalAfters THREADID  threadIndex,
const CONTEXT from,
const CONTEXT to
 

Call signal "after" callbacks.

VOID LEVEL_PINCLIENT::DeprecatedCallSignalBefores THREADID  threadIndex,
INT32  sig,
const CONTEXT from,
const CONTEXT to
 

Call signal "before" callbacks.

VOID LEVEL_PINCLIENT::DeprecatedCallThreadBegins THREADID  threadIndex,
VOID *  sp,
int  flags
 

Call thread "begin" callbacks.

VOID LEVEL_PINCLIENT::DeprecatedCallThreadEnds THREADID  threadIndex,
INT32  code
 

Call thread "end" callbacks.

LOCALFUN VOID LEVEL_PINCLIENT::DestroyClientTls THREADID  threadIndex  ) 
 

Destroy client TLS in the given thread.

Parameters:
[in] threadIndex ID of the target thread

LOCALFUN VOID LEVEL_PINCLIENT::DisassembleRegion RTN  rtn,
BBL  bbl,
const VOID *  current,
const VOID *  end,
ADDRINT  rtnStart,
ADDRINT  rtnEnd,
ADDRINT  rtnLimit,
ADDRINT  virtual_offset
 

RtnOutsideRangesManager().HaveRet()

VOID LEVEL_PINCLIENT::DoAttachsProbed  ) 
 

Perfrom probed attach operations

VOID LEVEL_PINCLIENT::DoDetachs  ) 
 

Walk the list of detach functions

VOID LEVEL_PINCLIENT::DoDetachsProbed  ) 
 

On Linux distributions, this function is called by the dedicated thread. It is called when all of the thread detach callbacks from all the application threads have been given. On non Linux distributions, this function is called by the dedicated detach thread while all of the application threads are stopped. The function performs:

  • Remove callbacks and probes.
  • Unload all images (and ask to remove probes),
  • Set pin state to be detached.,
  • Call the detach completion callbacks(Only on non linux).
  • Notify about detach completion (Only on non linux).

EDG LEVEL_PINCLIENT::EDG_INVALID  ) 
 

Returns:
An invalid edge

EDG LEVEL_PINCLIENT::EDG_NextSucc EDG  x  ) 
 

Returns:
The next successor edge

EDG_TYPE LEVEL_PINCLIENT::EDG_Type EDG  x  ) 
 

Returns:
The type of the edge

BOOL LEVEL_PINCLIENT::EDG_Valid EDG  x  ) 
 

Returns:
True if x is not EDG_INVALID()

VOID LEVEL_PINCLIENT::EnterPinClientMasterMode  ) 
 

The VM has called into the pin client

VOID LEVEL_PINCLIENT::ExitPinClientMasterMode  ) 
 

Returning from pin client to VM

LOCALFUN VOID LEVEL_PINCLIENT::FindCodeRanges IMG  img,
CODE_RANGES *  rangeMap
 

Find all code ranges in binary image according to information from image headers.

string LEVEL_PINCLIENT::FindGnuDebugLinkFile IMG  img,
CHAR **  imageStart,
size_t *  imageSize
 

Find the filename of a .gnu_debug_link section. Return the filename of the debug link and an open file descriptor for it.

LOCALINLINE OS_THREAD_ID LEVEL_PINCLIENT::GetCurrentSysId  ) 
 

Returns:
The OS thread ID for the calling thread.

OS_THREAD_ID LEVEL_PINCLIENT::GetCurrentSysIdById THREADID  tid  ) 
 

Get the OS thread ID for the calling thread.

Parameters:
[in] tid Pin ID for the calling thread.
Returns:
OS ID for the calling thread.

LOCALFUN VOID LEVEL_PINCLIENT::GetEmulatedRegister unsigned  toolRegId,
THREADID  tid,
CONTEXT ctxt,
VOID *  data
 

Call a client function to get the value of an emulated register.

Parameters:
[in] toolRegId Tool's ID which identifies the emulated register.
[in] tid The thread whose register is requested.
[in] ctxt Architected register state for the thread.
[out] data Receives the value of the register.

BOOL LEVEL_PINCLIENT::GetInTraceCallbacks  ) 
 

Get the value of inTraceCallbacks

IMG LEVEL_PINCLIENT::GetOpenImg  ) 
 

This function provides the IMG structure of the image opened by IMG_Open

LOCALFUN USIZE LEVEL_PINCLIENT::GetTargetDescription const std::string &  name,
USIZE  size,
VOID *  buf
 

Call a client function to get a document that describes the target machine's registers.

Parameters:
[in] name The name of the requested document.
[in] size Size (bytes) of the buf buffer.
[out] buf Points to a buffer that receives the content of the document.
Returns:
The size of the requested document or zero if the tool doesn't know this document.

VOID LEVEL_PINCLIENT::GetVmLock  ) 
 

Get the vm lock.

Availability:
Mode: JIT
O/S: Linux, Windows & OS X*
CPU: All

VOID LEVEL_PINCLIENT::ImageInitialize BOOL  forReplay  ) 
 

Initialize the image tracking code.

  • Load the main image
  • If we are attaching and the loader has initialized, scan the shared libraries
  • If we are not attaching, find the loader and explicitly scan it

LOCALFUN VOID LEVEL_PINCLIENT::ImageInitializeFirst  ) 
 

Initialize images before Pin client started.

  • Clear Pin client list of registered images.
  • Enumerate and register all already loaded images.
  • Call image load callback function for every registered image. Called by VM in _startProgram()

VOID LEVEL_PINCLIENT::ImageInstrument TRACE  trace  ) 
 

Called when each trace is instrumented to support code for tracking images.

  • Instruments the shared library loader entry that is called every time an image is loaded The instrumentation will scan for shared libraries
  • Captures the pointer to the LoaderInfo when ld-linux has initialized DT_DEBUG

VOID LEVEL_PINCLIENT::ImageUnInitialize  ) 
 

Uninitialize the image tracking code.

IMG LEVEL_PINCLIENT::IMG_CreateAt const char *  filename,
ADDRINT  start,
USIZE  size,
ADDRINT  loadOffset,
BOOL  mainExecutable
 

Returns a IMG object for image loaded outside of PIN's loader. Tool should use this IMG object to mark the routines inside it, using RTN_CreateAt(). After all the routines are marked, tool should call IMG_ReplayImageLoad() to finalize the image load procedure.

Parameters:
filename name of the image visible to Pin tools
start memory address where first byte of the image is loaded to
size the size of the image in memory. This means that the image region in memory will be at [start .. start+size)
loadOffset the offset between the memory addresses specified in the executable/library files and the memory addresses where this image was actaully loaded
mainImage TRUE if this is the main image
Returns:
IMG object that represents the image. Please make sure to call IMG_ReplayImageLoad() on the IMG object after you're done creating all the routines in the IMG object.
Availability:
Mode: JIT
O/S: All
CPU: All

VOID LEVEL_PINCLIENT::IMG_ExecuteRecordedLoadOps  ) 
 

Execute the list of recorded image load operations and clean the list as we go.

IMG LEVEL_PINCLIENT::IMG_FindBySectionsAddress ADDRINT  address  ) 
 

Find image by address. Given an address, it is considered belonging to an image only if the address equals to one of the following: the start address of the text segment, the start address of the data segment or the lowest address loaded by the image.

Returns:
IMG object, valid or invalid
Note:
The pin client lock is obtained during the call of this API.
Availability:
Mode: JIT & Probe
O/S: Linux, Windows & MacOS
CPU: All

IMG LEVEL_PINCLIENT::IMG_FindByUnloadAddress ADDRINT  startAddress  ) 
 

Find image by the address which the loader uses when it frees the memory of an image. For Linux and OS X*, for each image, check if the address equals to the start address of the text segment. For Windows, for each image, check if the address equals to the start of the Image. This function should be used to determined if ProcessImageUnload should be called when unmapping an address.

Returns:
IMG object, valid or invalid
Note:
The pin client lock is obtained during the call of this API.
Availability:
Mode: JIT & Probe
O/S: Linux, Windows & MacOS
CPU: All

ADDRINT LEVEL_PINCLIENT::IMG_FindDataSymbolAddress IMG  origImg,
const CHAR *  symname
 

Find the address of a data symbol in an image. Since that image doesn't have the symbol table in memory anymore (it was unmapped), we need to read the image into a temporary image. This is quite expensive so it is not recommended to expose it to the API or use it frequently.

RTN LEVEL_PINCLIENT::IMG_FindRtnByName IMG  img,
const string &  name
 

Find a particular routine by name in the given image

VOID LEVEL_PINCLIENT::IMG_FreeDebugInfo IMG  img  ) 
 

Free debug info

VOID* LEVEL_PINCLIENT::IMG_GetLoaderInfo IMG  img  ) 
 

Gets a read-only copy of loader information for the image which is used in PIN ADX debugger.

Parameters:
img The image object to act on
Returns:
Pointer to OS specific structure that holds data about loader information. On Linux, this is a pointer to struct LINUX_LOADER_IMAGE_INFO.
Availability:
Mode: JIT
O/S: Linux
CPU: All

BOOL LEVEL_PINCLIENT::IMG_GetSubprogramsInfo IMG  img,
map< ADDRINT, SymbolDebugInfo > &  routines
 

Return subprograms debug info for an image.

BOOL LEVEL_PINCLIENT::IMG_IsStandardGccLibrary IMG  img  ) 
 

Return TRUE if the specified image is libgcc library

BOOL LEVEL_PINCLIENT::IMG_IsStandardLoaderLibrary IMG  img  ) 
 

Return TRUE if the specified image is ld library

BOOL LEVEL_PINCLIENT::IMG_IsStandardSystemLibrary IMG  img  ) 
 

Return TRUE if the specified image is libc library

BOOL LEVEL_PINCLIENT::IMG_IsStandardThreadLibrary IMG  img  ) 
 

Return TRUE if the specified image is libpthread library

VOID LEVEL_PINCLIENT::IMG_RecordLoadOp IMG  img  ) 
 

Remember an imge load operation so that we can execute it when PIN_StartProgram is called.

VOID LEVEL_PINCLIENT::IMG_RecordLoadOp const string &  imageName,
const char *  fileName,
ADDRINT  lo,
UINT32  fl
 

Remember an imge load operation so that we can execute it when PIN_StartProgram is called.

VOID LEVEL_PINCLIENT::IMG_RemoveToolCallbacks  ) 
 

Remove all image notification functions

VOID LEVEL_PINCLIENT::IMG_ReplayImageLoad IMG  img  ) 
 

Replays the image load of an IMG object (created by IMG_CreateAt()). This means that all the image load callbacks will be called for the specified IMG object. If PIN_StartProgram() wasn't called yet, PIN will enqueue this request and will process this request after PIN_StartProgram() was called

Parameters:
[in] img The image object to replay its load
Note:
The vm and pin client locks are obtained during the call of this API.
Availability:
Mode: JIT
O/S: All
CPU: All

VOID LEVEL_PINCLIENT::IMG_SetLoaderInfo IMG  img,
VOID *  loaderInfo
 

Sets the loader information for the image which are used in PIN ADX debugger.

Parameters:
img The image object to act on
loaderInfo Points to OS specific structure that holds data about loader information. On Linux, this is a pointer to struct LINUX_LOADER_IMAGE_INFO.
Availability:
Mode: JIT
O/S: Linux
CPU: All

VOID LEVEL_PINCLIENT::IMG_UnmapImage IMG  img  ) 
 

Unmap file

VOID LEVEL_PINCLIENT::InitDynamicCodeImage IMG  newImg  ) 
 

Initialize an dynamic code image after it has been allocated. An dynamic code image contains dynamically created code, e.g. Jitted functions.

VOID LEVEL_PINCLIENT::InitializeApp  ) 
 

Initialize app for usage

LOCALFUN VOID LEVEL_PINCLIENT::InitializeClientTls THREADID  threadIndex  ) 
 

Initialize client TLS in the current thread.

Parameters:
[in] threadIndex ID of the current thread

VOID LEVEL_PINCLIENT::InitializeFollowChildClient  ) 
 

Initialize follow-child callbacks

VOID LEVEL_PINCLIENT::INS_InsertCallProbed INS  orgIns,
IPOINT  action,
AFUNPTR  funPtr,
  ...
 

This routine inserts a call before/after one instruction

BOOL LEVEL_PINCLIENT::INS_IsNativeCall INS  ins  ) 
 

Returns:
TRUE if a call instruction is marked to be executed natively.

BOOL LEVEL_PINCLIENT::INS_IsNativeXfer INS  ins  ) 
 

Returns:
TRUE if a control flow instruction has been setup to transfer control back to the native code on the taken path. This is the default mechanism.

BOOL LEVEL_PINCLIENT::INS_IsPinXfer INS  ins  ) 
 

Returns:
TRUE if a control flow instruction has been setup to transfer control to trace generator upon the taken path.

BOOL LEVEL_PINCLIENT::INS_IsXlateCall INS  ins  ) 
 

Returns:
TRUE if a call instruction is marked to be traslated to a push and a jump to the target to ensure transparency to the application as to where the call originated from.

VOID LEVEL_PINCLIENT::INS_ReplaceSignatureProbed INS  orgIns,
AFUNPTR  replacementFunptr,
  ...
 

This routine replaces one instruction The caller checks whether the routine CFG allows this replacement.

VOID LEVEL_PINCLIENT::INS_SetNativeCall INS  ins  ) 
 

A call instruction is not translated into a PUSH and a JUMP. This implies that the application might realize that the call is being made from the trace in the code cache and thus any code that depends on the return address at the target site is no longer valid and thus results in program corruption. Doing this implies any instruction following the call in the trace is executed.

VOID LEVEL_PINCLIENT::INS_SetNativeXfer INS  ins  ) 
 

Set a control flow instruction to transfer control back to the native code on the taken path. This is the default mechanism.

VOID LEVEL_PINCLIENT::INS_SetPinXfer INS  ins  ) 
 

Set a control flow instruction to transfer control back to the trace generator upon the taken path.

VOID LEVEL_PINCLIENT::INS_SetXlateCall INS  ins  ) 
 

A call instruction is translated into a return address PUSH and a JMP to ensure that the application does not realize that the call occured in the code cache if it looked at the return address on the stack since we put the original application return address on the stack. This implies that when a return is executed at the call target the control returns to the original application. Any fallthrough instructions in the trace are not executed. Also see INS_SetNativeCall for otherwise.

VOID LEVEL_PINCLIENT::INS_skip_xlate_set INS  ins,
BOOL  b
 

mark this instruction so it will not be translated by the VM.

LOCALFUN size_t LEVEL_PINCLIENT::InstFetcher void *  copyBuf,
const VOID *  address,
size_t  maxSizeToCopy,
EXCEPTION_INFO pExceptInfo
 

This is the function that is called to fetch instruction bytes from the tool's registered callback fetch function (if any).

Parameters:
[out] copyBuf A buffer which receives the fetched instruction bytes. This buffer is at least size bytes long.
[in] address Starting address from which instruction bytes should be fetched.
[in] maxSizeToCopy The number of bytes that should be fetched.
[out] pExceptInfo If less than maxSizeToCopy bytes are fetched, pExceptInfo receives an exception that describes why more bytes could not be fetched. If Pin needs more bytes to decode the next instruction, this exception will be delivered to the application.
Returns:
The number of bytes successfully fetched into copyBuf. This may be less than maxSizeToCopy (or even zero) if Pin attempts to fetch instructions from an invalid address.

BOOL LEVEL_PINCLIENT::IsPinLoaded const string &  name  ) 
 

x

BOOL LEVEL_PINCLIENT::IsProcessExiting  ) 
 

Check to see if the current process is about to exit.

Returns:
TRUE, if the current process is exiting.
Availability:
Mode: JIT
O/S: All
CPU: All

BOOL LEVEL_PINCLIENT::IsThreadInFiniCallback OS_THREAD_ID  sysId  ) 
 

Tells whether the given thread is currently executing a thread-fini callback.

Parameters:
[in] sysId O/S ID for a thread.
Returns:
TRUE if the thread sysId is currently executing a thread-fini callback.

KNOB<BOOL> LEVEL_PINCLIENT::KnobAppendLogFile KNOB_MODE_WRITEONCE  ,
"supported"  ,
"append_logfile"  ,
"0"  ,
"Append to the end of the log file if it already exists" 
 

New log messages should be appended to the end of the log file if it already exists.

KNOB<BOOL> LEVEL_PINCLIENT::KnobJitApi KNOB_MODE_WRITEONCE  ,
"pintool:sym"  ,
"support_jit_api"  ,
"0"  ,
"Enables the Jitted Functions Support" 
 

This knob enables the Jitted Functions Support.

MESSAGE_TYPE LEVEL_PINCLIENT::MessageTypeLogBuffer "log_buffer"  ,
""  ,
false  ,
false  ,
false  ,
true  ,
LOGTYPE_LOGFILE  ,
"pin log: buffering" 
 

messages associated with fast buffering API

MESSAGE_TYPE LEVEL_PINCLIENT::MessageTypeLogFetchRtnIns "log_fetch_rtn_ins"  ,
""  ,
false  ,
false  ,
false  ,
false  ,
LOGTYPE_LOGFILE  ,
"pin log: fetch rtn ins information" 
 

Fetch RTN INS log message

MESSAGE_TYPE LEVEL_PINCLIENT::MessageTypeLogImage "log_image"  ,
""  ,
false  ,
false  ,
false  ,
false  ,
LOGTYPE_LOGFILE  ,
"pin log: image API" 
 

Logging for image api

MESSAGE_TYPE LEVEL_PINCLIENT::MessageTypeLogProbe "log_probe"  ,
""  ,
false  ,
false  ,
false  ,
false  ,
LOGTYPE_LOGFILE  ,
"pin log: probe information" 
 

Probe log message

MESSAGE_TYPE LEVEL_PINCLIENT::MessageTypeLogSym "log_sym"  ,
""  ,
false  ,
false  ,
false  ,
false  ,
LOGTYPE_LOGFILE  ,
"pin log: symbol API" 
 

Logging for symbols in image api

MESSAGE_TYPE LEVEL_PINCLIENT::MessageTypeLogUnwind "log_unwind"  ,
""  ,
false  ,
false  ,
false  ,
false  ,
LOGTYPE_LOGFILE  ,
"pin log: unwind" 
 

messages associated with PinProbes

VOID LEVEL_PINCLIENT::NotifyDataRange CODE_RANGES *  rangeMap,
ADDRINT  base,
USIZE  size
 

Update code range database to take into account the specified data range.

VOID LEVEL_PINCLIENT::NotifyDataRanges IMG  img,
CODE_RANGES *  rangeMap
 

Update original map of code ranges in binary image taking into account known data ranges that may overlap with the original code ranges.

VOID LEVEL_PINCLIENT::NotifyDebuggerOnImageLoad BOOL  isMain,
VOID *  loaderInfo
 

Notifies the debugger that new image had been loaded

Parameters:
isMain True is the image is the main executable
loaderInfo Points to a LINUX_LOADER_IMAGE_INFO that holds image information for PINADX

VOID LEVEL_PINCLIENT::NotifyDebuggerOnImageUnload VOID *  loaderInfo  ) 
 

Notifies the debugger that an image was unloaded

Parameters:
loaderInfo Points to a LINUX_LOADER_IMAGE_INFO that holds image information for PINADX

VOID LEVEL_PINCLIENT::NotifyDetachCompletedJitMode  ) 
 

Remove all client callbacks after detach

LOCALFUN VOID LEVEL_PINCLIENT::NotifyOutOfMemory size_t  size  ) 
 

Notify pin / pin tool is out of memory. Do minimal actions in here due to the subtle location (i.e. no memory)

  • Don't serialize the callback
  • Don't use any STL in here

LOCALFUN VOID LEVEL_PINCLIENT::NotifyPrepareForFini  ) 
 

Notify that Pin is about to detach from terminating process. The function that is registered by this callback may do the following:

  • Force all the internal threads of the tool to finish using return from the main function of the thread or calling PIN_ExitThread.
  • Wait until all the internal threads are finished before it will continue to run.

VOID LEVEL_PINCLIENT::Open_Rtn RTN  rtn  ) 
 

Open the given RTN.

VOID LEVEL_PINCLIENT::PIN_AddDebuggerRegisterEmulator unsigned  numRegisters,
const DEBUGGER_REG_DESCRIPTION registerDescriptions,
GET_EMULATED_REGISTER_CALLBACK  getFun,
SET_EMULATED_REGISTER_CALLBACK  setFun,
GET_TARGET_DESCRIPTION_CALLBACK  getDescriptionFun,
VOID *  val
 

This API is useful for Pin tools that emulate registers that do not exist in the host machine's ISA. If an application debugger is attached to Pin, this API informs the debugger about the extended registers, allowing users to display and manipulate the emulated registers as though they were native registers. Of course, not all debuggers have this capability. Calling this API for such a non-conforming debugger is legal, but ineffective. A non-conforming debugger will ignore the emulated registers and just display the native ones.

When using this API, the set of registers presented to the debugger is specified in two redundant ways, and it is the tool's responsibility to ensure that they are consistent. One specification is a text document that the debugger reads. This document can have any format that the tool and the debugger agree upon, and could convey information about the registers, how they should be displayed in the debugger, etc. The tool provides this document via the getDescriptionFun call-back. The second register specification is through the registerDescriptions parameter, which Pin uses when communicating the register values to the debugger.

If this API is called, it must be called before calling PIN_StartProgram(). Also, a tool can install only one debugger register emulator, so a call to PIN_AddDebuggerRegisterEmulator() will overwrite any previous call.

When used with GDB, this API is effective only for versions of GDB that support register extensions in the XML "feature document". This includes GDB versions 7.2 and later, as well as some distributions of earlier GDB versions.

Parameters:
[in] numRegisters The number of entries in registerDescriptions.
[in] registerDescriptions An array describing each register that the debugger will know about. This includes both native registers and emulated registers.
[in] getFun Call-back function that Pin calls to get the value of an emulated register.
[in] setFun Call-back function that Pin calls to set the value of an emulated register.
[in] getDescriptionFun Call-back function that Pin calls to get the content of a text document that tells the debugger about the registers defined in registerDescriptions.
[in] val Value passed to the call-back functions.
Note:
The pin client lock is obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux, Windows
CPU: IA-32 and Intel(R) 64 architectures

BOOL LEVEL_PINCLIENT::PIN_CallerOwnsClientMutex  ) 
 

Return TRUE if calling thread is the owner of the lock.

Availability:
Mode: JIT & Probe
O/S: Linux, Windows & OS X*
CPU: All

BOOL LEVEL_PINCLIENT::PIN_CallerOwnsClientMutex OS_THREAD_ID  osid  ) 
 

Return TRUE if calling thread is the owner of the lock.

Parameters:
[in] osid OS ID of calling thread.
Availability:
Mode: JIT & Probe
O/S: Linux, Windows & OS X*
CPU: All

OS_THREAD_ID LEVEL_PINCLIENT::PIN_ClientFork  ) 
 

Allow a Pintool to safely fork. Call the fork system call and notify the VM appropriately.

Returns:
Parent: ID of the child, child: 0, INVALID_THREADID if fork failed
Availability:
Mode: JIT
O/S: Linux & OS X*
CPU: All

BOOL LEVEL_PINCLIENT::PIN_InsertProbe ADDRINT  src_addr,
ADDRINT  dst_addr
 

This is an internal Pin API. It is not supported for use in general tools. We reserve the right to change or remove this API at any time without advanced notice.

This API must be used in conjunction with other internal APIs. Do not use this API.

Inserts a probe at an address.

Parameters:
src_addr Address to insert the probe at
dst_addr Target to where the probe should point to

VOID LEVEL_PINCLIENT::PIN_InterceptDebuggingEvent DEBUGGING_EVENT  eventType,
INTERCEPT_DEBUGGING_EVENT_CALLBACK  fun,
VOID *  arg
 

Establish an interceptor function for debugging events that Pin sends to an external debugger. This API allows a tool to filter these events before they are visible to the debugger.

A tool can set only one "intercept" function for a particular event, so a new function overwrites any previous one for the same event. To disable an interceptor, pass a NULL function pointer.

Parameters:
[in] eventType Tells the type of events to intercept.
[in] fun The tool's interceptor function, or NULL.
[in] val Value to pass to the interceptor function.
Note:
The pin client lock is obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux, Windows
CPU: IA-32 and Intel(R) 64 architectures

VOID LEVEL_PINCLIENT::PIN_RemoveFollowChildProcessFunctions  ) 
 

Remove all follow child notification functions

VOID LEVEL_PINCLIENT::PIN_RemoveProbe ADDRINT  address  ) 
 

This is an internal Pin API. It is not supported for use in general tools. We reserve the right to change or remove this API at any time without advanced notice.

Remove a probe that was previously inserted at address

Parameters:
src_addr Address at which a probe was previously inserted

VOID LEVEL_PINCLIENT::PIN_ReplayContextChange THREADID  tid,
const CONTEXT from,
CONTEXT to,
CONTEXT_CHANGE_REASON  reason,
INT32  info
 

This API is intended for use by tools that replay the execution of an application and need to replay an asynchronous context change that was received by the application at record time. This API is not intended as a general way to send a forced context change (signal, exception, APC) to the application. To do that, see PIN_RaiseException().

Calling this API causes Pin to call back on the tool's context-changed notification function if one was set up with PIN_AddContextChangeFunction(). Thus, the tool is notified about the context change as though the application really received it. Calling this API may also notify an external debugger if one is attached to Pin via the -appdebug switch, which gives the debugger a chance to stop execution of the application when it receives the replayed context change. (Whether this happens depends on the CONTEXT_CHANGE_REASON, and the expected behavior of the debugger on different platforms).

PIN_ReplayContextChange() does not return to its caller. If the to parameter is not NULL, execution resumes at that context after it has been potentially modified by the tool's context-changed call-back. If reason is CONTEXT_CHANGE_REASON_FATALSIGNAL, Pin emulates a fatal signal and execution terminates gracefully after calling the tool's Fini functions.

This API can be called from an analysis routine or a replacement routine, but not from a callback.

Parameters:
[in] tid The ID of the calling thread.
[in] from The register state prior to the context change (e.g. the register state at the point when the signal is received for CONTEXT_CHANGE_REASON_SIGNAL).
[in] to The register state immediately after the context change. This should be NULL for CONTEXT_CHANGE_REASON_FATALSIGNAL.
[in] reason The type of the context change.
[in] info Additional information, depending on reason. (Ignored for reason codes not listed below.)
  • CONTEXT_CHANGE_REASON_FATALSIGNAL: The Unix signal number.
  • CONTEXT_CHANGE_REASON_SIGNAL: The Unix signal number.
  • CONTEXT_CHANGE_REASON_EXCEPTION: The Windows exception code.
Returns:
This function does not return.
Note:
The vm and pin client locks are obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux & Windows
CPU: All

IMG LEVEL_PINCLIENT::PIN_ReplayImageLoad const char *  imageName,
const char *  fileName,
ADDRINT  loadOffset,
REPLAY_IMAGE_TYPE  imageType
 

Ask Pin to perform all the functions it would normally do when it detects that a new shared library has been loaded. This is intended for use in a replay system, where the replay tool has recorded library load operations, and now wants to replay them.

The code calling this routine need not ensure that the loaded sections of the image have already been restored. Using this interface causes Pin to use its private copy of the image information to satisfy the IMG, SEC and RTN functions.

This routine can be called before PIN_StartProgram to set up image load operations for images which were loaded before Pin took control of the program at record time (on Unix systems these are normally the main executable and the dynamic linker; on Windows more system libraries may be present). When called at this point the image load callbacks are remembered internally, and replayed when PIN_StartProgram is called. (This is the same time they would have been made at record time, and ensures that all relevant callbacks have been registered).

PIN_ReplayImageLoad can also be called from analysis or callback routines, in which case the relevant callbacks are made immediately. If called from an analysis routine, the Pin client lock must be claimed before calling PIN_ReplayImageLoad (the Pin client lock is already held when in a callback routine, so there is no need to claim it again).

Parameters:
imageName name of the image visible to Pin tools
fileName name of the file from which the image is read
loadOffset offset from the address at which the image is naturally loaded to the address at which it has been loaded
imageType Type of the image to load
Returns:
the image id of the loaded img, or IMG_INVALID() when called before PIN_StartProgram
Note:
The vm and pin client locks are obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux (others to follow)
CPU: All

VOID LEVEL_PINCLIENT::PIN_ReplayImageUnload IMG  img  ) 
 

Ask Pin to perform all the functions it would normally do when it detects that a shared library has been unloaded. This is intended for use in a replay system, where the replay tool has recorded library unload operations, and now wants to replay them.

Note that a replay system need not explicitly call this function to cause image unload callbacks at the end of process execution. Pin will generate those callbacks itself provided that images were created using the PIN_ReplayImageLoad call. However, this function is required to handle explicit image unloads (for instance those caused by dlclose() )

PIN_ReplayImageUnload can be called from analysis or callback routines. If called from an analysis routine, the Pin client lock must be claimed before calling PIN_ReplayImageUnload (the Pin client lock is already held when in a callback routine, so there is no need to claim it again).

Parameters:
img the IMG to be unloaded
Note:
The pin client lock is obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux (others to follow)
CPU: All

VOID LEVEL_PINCLIENT::PIN_ReplaySyscallEntry THREADID  tid,
CONTEXT ctxt,
SYSCALL_STANDARD  std
 

This API is intended for use by tools that replay the execution of an application and need to behave as if a system call has been made, calling all callbacks registered with PIN_AddSysCallEntry function. However, no system call is actually performed.

This API can be called from an analysis routine or a replacement routine, but not from a call-back.

Parameters:
[in] tid The ID of the thread in which the system call appears to execute.
[in] from The register state at the point when the system call appears to execute.
[in] std The calling standard of the system call.
Note:
The vm and pin client locks are obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux,Windows,BSD
CPU: All

VOID LEVEL_PINCLIENT::PIN_ReplaySyscallExit THREADID  tid,
CONTEXT ctxt,
SYSCALL_STANDARD  std
 

This API is intended for use by tools that replay the execution of an application and need to behave as if a system call has been made, calling all callbacks registered with PIN_AddSysCallExit function. However, no system call is actually performed.

This API can be called from an analysis routine or a replacement routine, but not from a call-back.

Parameters:
[in] tid The ID of the thread in which the system call appears to execute.
[in] from The register state at the point after the system call has executed.
[in] std The calling standard of the system call.
Note:
The vm and pin client locks are obtained during the call of this API.
Availability:
Mode: JIT
O/S: Linux,Windows,BSD
CPU: All

VOID LEVEL_PINCLIENT::PIN_SetReplayMode UINT32  flags  ) 
 

Tell Pin to execute different sets of operations in replay mode.

The only flag currently supported is REPLAY_MODE_IMAGEOPS which disables Pin's normal detection of image load and unload events, which are expected to be replayed through the PIN_ReplayImageLoad and PIN_ReplayImageUnload calls. It also avoids Pin loading information about the initial image given on the command line.

Other flags may be added as required in the future.

Must be called before PIN_StartProgram

Parameters:
flags A mask created from the PIN_REPLAY_MODE_FLAGS enum describing the operations the replayer will take control of.
Availability:
Mode: JIT
O/S: Linux (others later)
CPU: All

BOOL LEVEL_PINCLIENT::PIN_SpawnApplicationThread const CONTEXT ctxt  ) 
 

Start a new thread which will begin to execute with the register state from the context. At least the flags register in the context must be sensible (even if all of the thread's registers will be set in the thread start callback).

This function requires the VM lock to operate, so will acquire and release it if it is not already held.

Parameters:
[in] ctxt context for the new thread.
Returns:
TRUE if a new thread was sucessfully spawned, FALSE if not.
Note:
The vm lock is obtained during the call of this API.

This function must be used on applications that are running with the (newer) NPTL version of pthread library. Running this function on an application that is running with the (older) LinuxThreads version of pthread can prevent PIN from shuting down the VM when the application exits.

Availability:
Mode: JIT
O/S: Linux
CPU: IA-32 and Intel(R) 64 architectures

BOOL LEVEL_PINCLIENT::PIN_TryClientLock  ) 
 

Atempts to acquire the client lock, but does not block the caller.

Returns:
Returns TRUE if the lock is acquired, FALSE if not.

VOID LEVEL_PINCLIENT::PIN_UnloadAllImages BOOL  copyBits  ) 
 

Destroy all image objects. Remove probes.

BOOL LEVEL_PINCLIENT::PIN_WasMemoryReservedInLoadTime  ) 
 

Return TRUE if PIN was successfully reserved the neccessary memory at application load time (specified on the -reserve_memory knob), and was successfully restricted the memory from the loader (specified on the -restrict_memory knob). It is guaranteed this is the return value is FALSE then none the memory specified in the mentioned knobs was reserved/restricted

Returns:
TRUE if all the memory was reserved/restricted
Availability:
Mode: JIT
O/S: Linux
CPU: All

PIN_CLIENT_STATE& LEVEL_PINCLIENT::PinClientState  ) 
 

Return reference to the instance of the PIN_CLIENT_STATE singleton

LOCALFUN BOOL LEVEL_PINCLIENT::ProbeMayOverwriteBranchTarget INS  target_ins,
UINT32  probe_size,
BOOL *  mayOverwriteUnidentifiedBranchTarget
 

This routine tests to see if the probe may overwrite the target of a branch/call

IMG LEVEL_PINCLIENT::ProcessImageLoad const string &  filename,
const CHAR *  trueFilename,
ADDRINT  load_offset,
UINT32  flags,
void *  arg
 

When the application loads a new image, do some bookeeping.

Parameters:
[in] filename The filename seen by the user
[in] trueFilename The file actually read (or NULL if filename should be used)
[in] load_offset The offset from the images linked address to its load address
[in] flags Flags for the new image (an | of values from IMAGE_LOAD_FLAGS enumeration)
[in] arg Argument specific to the image type
Returns:
New IMG object corresponding to the loaded image. IMG_INVALID() if load was unsuccessful.

IMG LEVEL_PINCLIENT::ProcessImageLoad const string &  filename,
const CHAR *  trueFilename,
ADDRINT  load_offset,
UINT32  flags,
void *  loaderInfo,
void *  arg
 

When the application loads a new image, do some bookkeeping.

Parameters:
[in] filename The filename seen by the user
[in] trueFilename The file actually read (or NULL if filename should be used)
[in] load_offset The offset from the images linked address to its load address
[in] flags Flags for the new image (an | of values from IMAGE_LOAD_FLAGS enumeration)
[in] loaderInfo Points to OS specific struct containing loader information about the image to be used for PINADX debugger.
[in] arg Argument specific to the image type
Returns:
New IMG object corresponding to the loaded image. IMG_INVALID() if load was unsuccessful.

VOID LEVEL_PINCLIENT::ProcessImageUnload IMG  img,
BOOL  copyBits
 

Process image unload notification.

Parameters:
img unloaded image
copyBits should pin restore original probed bits back to the image code

VOID LEVEL_PINCLIENT::ProcessModuleUnload ADDRINT  base  ) 
 

Process module unload.

Parameters:
[in] base base address of the module

LOCALFUN VOID LEVEL_PINCLIENT::ReadElfHeader CHAR const *  file,
EHDR *  ehdr
 

Read the elf header of a binary

VOID LEVEL_PINCLIENT::ReleaseVmLock  ) 
 

Release the vm lock.

Availability:
Mode: JIT
O/S: Linux, Windows & OS X*
CPU: All

VOID LEVEL_PINCLIENT::ResetOpenImg  ) 
 

x

VOID LEVEL_PINCLIENT::ResetOpenRtn  ) 
 

x

ADDRINT LEVEL_PINCLIENT::ResolveIFunc ADDRINT  resolver  ) 
 

Resolve IFUNC address by calling its resolver.

Parameters:
[in] rtn Handle of RTN object

BOOL LEVEL_PINCLIENT::RTN_CheckFixups RTN  rtn,
INS  target_ins,
UINT32  probe_size
 

Return TRUE if fixup bytes intercept replaced bytes of the rtn entry point probe.

Parameters:
[in] rtn Handle of RTN object

LOCALFUN BOOL LEVEL_PINCLIENT::RTN_CheckRtnSizeForProbe RTN  rtn,
INS  target_ins,
BOOL  checkForPadding,
UINT32  probe_size
 

This routine tests the size of a function, starting at the probe target instruction, to ensure that a probe will not overflow its bounds. The function returns TRUE in case rtn size is not fit for probe.

RTN LEVEL_PINCLIENT::RTN_CreateJitFunction IMG  img,
ADDRINT  address,
const string &  name,
USIZE  size
 

Create a Jitted function at the given address.

Parameters:
[in] address The start address of the new routine
[in] name The assigned name of the new routine
Returns:
RTN object The new created routine object.
Note:
Close any open routine before calling this interface with RTN_Close().
Availability:
Mode: JIT
O/S: All
CPU: All

LOCALFUN VOID LEVEL_PINCLIENT::RTN_Destroy RTN  rtn  ) 
 

an rtn No RTN can be open when destroying an RTN

VOID LEVEL_PINCLIENT::RTN_DestroyJitFunction ADDRINT  address  ) 
 

Destroy a Jitted function object at the given address.

Parameters:
[in] address The start address of the routine to destroy
Note:
Close any open routine before calling this interface with RTN_Close().
Availability:
Mode: JIT & Probe
O/S: Linux, Windows & MacOS
CPU: All

LOCALFUN VOID LEVEL_PINCLIENT::RTN_InsertCallProbedImpl RTN  rtn,
IPOINT  action,
AFUNPTR  funptr,
PROBE_MODE  mode,
va_list  argList
 

Insert a probe at a routine enty

Parameters:
orgRtn The application routine to instrument
action Use IPOINT_BEFORE or IPOINT_AFTER to call funptr before or after execution.
funptr The analysis function
mode The probe mode (PROBE_MODE_DEFAULT /PROBE_MODE_ALLOW_RELOCATION)
argList a signature of "replacement" specified as a variable list of arguments

VOID LEVEL_PINCLIENT::RTN_InsertFillBuffer RTN  rtn,
IPOINT  action,
BUFFER_ID  id,
  ...
 

Insert analysis code to fill one record in a trace buffer, relative to a RTN.

Parameters:
[in] rtn The application RTN
[in] action Whether the record is filled before or after the RTN
[in] id The ID of the bufer whose record is filled
[in] ... IARG_TYPE. Additional arguments to specify the fields of the trace buffer.
Certain IARG_TYPEs cannot be used with the *_InsertFillBuffer APIs. The unsupported IARG_TYPEs are: IARG_CONTEXT, IARG_REG_REFERENCE, and IARG_REG_CONST_REFERENCE.

Availability:
Mode: JIT
O/S: Linux & Windows
CPU: IA-32 and Intel(R) 64 architectures

AFUNPTR LEVEL_PINCLIENT::RTN_InsertProbe RTN  rtn,
AFUNPTR  replacement,
PROBE_MODE  mode
 

This is an internal Pin API. It is not supported for use in general tools. We reserve the right to change or remove this API at any time without advanced notice.

This API must be used in conjunction with other internal APIs. Do not use this API.

Install a probe at the entry point of a routine

Parameters:
rtn routine to be probed
probe routine to call at the probe point
mode - specifies whether the routine can be relocated if probe insertion is impossible due to small first bb
Returns:
function pointer that to be called to execute the original unprobed routine
Note:
The pin client lock is obtained during the call of this API.

VOID LEVEL_PINCLIENT::RTN_OpenAndFetch RTN  rtn  ) 
 

Open the given rtn and fetch all the instructions

Availability:
Mode: JIT & Probe
O/S: Linux, Windows & MacOS
CPU: All

LOCALFUN VOID LEVEL_PINCLIENT::ScanLibraries  ) 
 

Search for DLLs that Pin hasn't yet seen.

LOCALFUN VOID LEVEL_PINCLIENT::ScanLibrariesLocked  ) 
 

Take VM lock and client lock before scan.

In the probe mode we also take VmLock because in attach mode one thread may be still in Vm and another thread may be in dlopen process.

LOCALFUN VOID LEVEL_PINCLIENT::ScanLibrariesUnlocked  ) 
 

All necessary locks are already taken (the function's name is misleading). Search for DLLs that Pin hasn't yet seen.

LOCALFUN VOID LEVEL_PINCLIENT::SetEmulatedRegister unsigned  toolRegId,
THREADID  tid,
CONTEXT ctxt,
const VOID *  data
 

Call a client function to set the value of an emulated register.

Parameters:
[in] toolRegId Tool's ID which identifies the emulated register.
[in] tid The thread whose register is requested.
[in] ctxt Architected register state for the thread.
[in] data Buffer with the value of the register.

LOCALFUN VOID LEVEL_PINCLIENT::Shutdown INT32  exitCode  ) 
 

Shutdown the client when the application is about to terminate.

Parameters:
[in] exitCode OS specific termination code for the application.

BOOL LEVEL_PINCLIENT::SYM_IsDataMarker SYM  sym  ) 
 

xxx

string LEVEL_PINCLIENT::SYM_UndecorateName const string &  symbolName,
UNDECORATION  style
 

Undecorate symbol name.
Provides undecoration of C++ names and decorated C names. The behavior of this function
is compiler and OS specific.

C++ decorated name is undecorated either to full signature (UNDECORATION_COMPLETE style)
or to [scope::]name form (UNDECORATION_NAME_ONLY style).

Example of undecoration of symbol generated by GCC compiler on Linux:

  Style                   Original name                      Undecorated name
  =====================   ==================                 ======================================
  UNDECORATION_COMPLETE   _ZN1A7method1ERKSt6vectorIiSaIiEE  A::method1(std::vector<int, std::allocator<int> > const&)
  UNDECORATION_NAME_ONLY                                     A::method1

Parameters:
[in] symbolName Decorated name
[in] style Undecoration style, relevant only to C++ undecoration
Values:
UNDECORATION_COMPLETE undecorate to full signature
UNDECORATION_NAME_ONLY undecorate to [scope::]name
Returns:
string containing undecorated symbol name.
If undecoration fails or is not supported, the function returns the unmodified original name.

BOOL LEVEL_PINCLIENT::ToolUseImageAPI  ) 
 

Return TRUE if the Pintool uses any image API support.

BBL LEVEL_PINCLIENT::TRACE_AddBranchEdg TRACE  trace  ) 
 

If the last instruction of the trace is a direct branch then add the target path bbl as the fallthrough path into the trace. TRACE_StraightenControlFlow must be invoked prior to compiling the trace to ensure that the branches are invereted.

Parameters:
trace Trace to add the new basic block to
Returns:
bbl A handle to the newly added basic block

BBL LEVEL_PINCLIENT::TRACE_AddFallthroughEdg TRACE  trace  ) 
 

Add the fallthrough path bbl of the current last instruction in the trace to the end of the trace.

Parameters:
trace Trace to add the new basic block to
Returns:
bbl A handle to the newly added basic block

BBL LEVEL_PINCLIENT::TRACE_AddInlineCallEdg TRACE  trace  ) 
 

If the last instruction of the trace is a direct call then inline the call target into the trace.

Parameters:
trace Trace to add the new basic block to
Returns:
bbl A handle to the newly added basic block

BBL LEVEL_PINCLIENT::TRACE_AddInlineReturnEdg TRACE  trace  ) 
 

Inline the return path of a call that has been previously inlined in this trace using TRACE_AddInlineCallEdg. This requires that the tail instruction of the trace is a return instruction.

Parameters:
trace Trace to add the new basic block to
Returns:
bbl A handle to the newly added basic block

TRACE LEVEL_PINCLIENT::TRACE_Allocate ADDRINT  addr  ) 
 

Create a new trace. The trace is initialized with a bbl starting at the requested address

Parameters:
addr The address from where to fetch the initialization bbl
Returns:
TRACE A handle to a trace initialized with a bbl begining at address
Note:
The pin client lock is obtained during the call of this API.

TRACE LEVEL_PINCLIENT::TRACE_AllocateForProbe PROBE_TYPE  probeType,
ADDRINT  addr,
RTN  rtn,
USIZE  probeSize,
BOOL  mustReadAtLeastProbesizeBytes
 

Like TRACE_Allocate, but only fetch enough instructions to cover a probe

Parameters:
probeType See PROBE_TYPE
addr The address from where to fetch the initialization bbl
Returns:
TRACE A handle to a trace initialized with a bbl begining at address
Note:
The pin client lock is obtained during the call of this API.

RTN LEVEL_PINCLIENT::TRACE_CodeRtn TRACE  trace  ) 
 

x

VOID LEVEL_PINCLIENT::TRACE_Deallocate TRACE  trace  ) 
 

Deallocate a prev. allocated trace.

Note:
The pin client lock is obtained during the call of this API.

VOID LEVEL_PINCLIENT::TRACE_ExitsXferToNative TRACE  trace  ) 
 

All exits from this trace go back to original code

ADDRINT LEVEL_PINCLIENT::TRACE_GenerateCode TRACE  trace  ) 
 

Compile and put trace in the code cache.

Returns:
Address where the trace has been placed

LOCALFUN ADDRINT LEVEL_PINCLIENT::TRACE_Oaddr TRACE  trace  ) 
 

This routine determines the starting code cache address of a trace (Note: Only valid after code cache space has been allocated for this trace - normally after the instrumentation phase.)

Returns:
Code Cache Address

ADDRINT LEVEL_PINCLIENT::TRACE_RelocateOriginalInsAddr ADDRINT  addr  ) 
 

Create a trace from a specified address, Transfer all exits to native generated a code, put in in code cache and return an address

Parameters:
addr - trace entry address
Returns:
address of the generated code in code cache
Note:
The pin client lock is obtained during the call of this API.

VOID LEVEL_PINCLIENT::TRACE_StraightenControlFlow TRACE  trace  ) 
 

Build the control flow for the trace just generated; allows the traversing of the instructions inserted into the trace. This must be called prior to looking at a trace that has applied TRACE_AddInlineCallEdg or TRACE_AddInlineReturnEdg functions for the adding of basic blocks to the trace. Upon invoking this function, the trace's control flow is fixed up to look as it would in the memory afer compilation.

INS LEVEL_PINCLIENT::TraceFirstIns ADDRINT  currTraceAddr  ) 
 

Returns the first instruction in the given trace.

VOID LEVEL_PINCLIENT::UnInitializeApp  ) 
 

Uninitialize app

LOCALFUN ADDRINT LEVEL_PINCLIENT::VdsoAddress  ) 
 

Return VDSO image base address

VOID LEVEL_PINCLIENT::VmFunctionNotInitialized  ) 
 

If the pintool is executed without a vm, then some of the function pointers in ClientIntData will not be defined. Rather than jump to 0 and segv, we print a message.


Variable Documentation

LOCALTYPE typedef TLS_KEY_ALLOCATOR<TLS_KEY_CLIENT_FIRST, TLS_KEY_CLIENT_LAST> LEVEL_PINCLIENT::CLIENT_TLS_KEY_ALLOCATOR
 

Allocator of TLS keys in client TLS.

LOCALVAR PINCLIENTINT LEVEL_PINCLIENT::ClientIntData
 

Initial value:

    {
    
    
    PINCLIENTINT::MAGIC,
    InitializeCallBacks
}

GLOBALCONST UINT32 LEVEL_PINCLIENT::MAX_IEH_CALLBACKS = 32
 

Maximum number of internal exception handling callbacks

LOCALVAR CLIENT_TLS_KEY_ALLOCATOR* LEVEL_PINCLIENT::pClientTlsKeyAllocator
 

Single instance of the allocator of TLS keys in client TLS.


Generated on Sun Aug 27 14:28:12 2017 for Pin by  doxygen 1.4.6