Pin
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Enumerations | Functions
bbl.cpp File Reference
#include "level_base.H"
#include "level_core.H"
#include "container.H"

Enumerations

enum  BBL_TYPE {
  LEVEL_CORE::BBL_TYPE_INVALID,
  LEVEL_CORE::BBL_TYPE_UBREAK,
  LEVEL_CORE::BBL_TYPE_CBREAK,
  LEVEL_CORE::BBL_TYPE_STOP,
  LEVEL_CORE::BBL_TYPE_UCALL_UNKNOWN,
  LEVEL_CORE::BBL_TYPE_UCALL_FUN,
  LEVEL_CORE::BBL_TYPE_UCALL_OS,
  LEVEL_CORE::BBL_TYPE_CCALL_OS,
  LEVEL_CORE::BBL_TYPE_CCALL_UNKNOWN,
  LEVEL_CORE::BBL_TYPE_CCALL_FUN,
  LEVEL_CORE::BBL_TYPE_NORMAL,
  LEVEL_CORE::BBL_TYPE_CBRANCH,
  LEVEL_CORE::BBL_TYPE_UBRANCH,
  LEVEL_CORE::BBL_TYPE_COUNTED,
  LEVEL_CORE::BBL_TYPE_SWPIPELINED,
  LEVEL_CORE::BBL_TYPE_CHECK,
  LEVEL_CORE::BBL_TYPE_PREFETCH,
  LEVEL_CORE::BBL_TYPE_UJUMP,
  LEVEL_CORE::BBL_TYPE_UJUMP_DYNLINK,
  LEVEL_CORE::BBL_TYPE_UJUMP_THUNK,
  LEVEL_CORE::BBL_TYPE_UJUMP_TRAMPOLINE,
  LEVEL_CORE::BBL_TYPE_UBRANCH_TRAMPOLINE,
  LEVEL_CORE::BBL_TYPE_CJUMP,
  LEVEL_CORE::BBL_TYPE_CJUMP_SWITCH,
  LEVEL_CORE::BBL_TYPE_STUB,
  LEVEL_CORE::BBL_TYPE_URETURN,
  LEVEL_CORE::BBL_TYPE_CRETURN,
  LEVEL_CORE::BBL_TYPE_DATA,
  LEVEL_CORE::BBL_TYPE_DATA_IADDR,
  LEVEL_CORE::BBL_TYPE_DATA_ARGBLOCK,
  LEVEL_CORE::BBL_TYPE_DATA_SWITCH1,
  LEVEL_CORE::BBL_TYPE_DATA_UNWIND,
  LEVEL_CORE::BBL_TYPE_DATA_LAST,
  LEVEL_CORE::BBL_TYPE_CONTAINER,
  LEVEL_CORE::BBL_TYPE_UNKNOWN,
  LEVEL_CORE::BBL_TYPE_VMSVC,
  LEVEL_CORE::BBL_TYPE_IBRANCH_LOOKUP,
  LEVEL_CORE::BBL_TYPE_EMU_FT,
  LEVEL_CORE::BBL_TYPE_UCALL_NATIVE_TARGET,
  BBL_TYPE_LAST
}
 
enum  BBL_STATE {
  BBL_STATE_INVALID,
  BBL_STATE_LAST
}
 

Functions

ARRAYBASE LEVEL_CORE::BblArrayBase ("bbl pool", 1024 *1024)
 
STRIPE< BBL_STRUCT_BASE > LEVEL_CORE::BblStripeBase ("bbl stripe base","core",&BblArrayBase)
 
STRIPE< BBL_STRUCT_MAP > LEVEL_CORE::BblStripeMap ("bbl stripe map ","map",&BblArrayBase)
 
BBL LEVEL_CORE::BBL_INVALID ()
 
BOOL LEVEL_CORE::BBL_valid (BBL x)
 
INT32 LEVEL_CORE::BBL_no (BBL x)
 
BOOL LEVEL_CORE::BBL_allocated (BBL x)
 
BOOL LEVEL_CORE::BBL_original (BBL x)
 
BOOL LEVEL_CORE::BBL_mark (BBL x)
 
VOID LEVEL_CORE::BBL_mark_set (BBL x, BOOL y)
 
BOOL LEVEL_CORE::BBL_mark2 (BBL x)
 
VOID LEVEL_CORE::BBL_mark2_set (BBL x, BOOL y)
 
BOOL LEVEL_CORE::BBL_has_fallthru (BBL x)
 
VOID LEVEL_CORE::BBL_has_fallthru_set (BBL x, BOOL y)
 
BOOL LEVEL_CORE::BBL_hot (BBL x)
 
VOID LEVEL_CORE::BBL_hot_set (BBL x, BOOL y)
 
BOOL LEVEL_CORE::BBL_is_instrumentable (BBL x)
 
VOID LEVEL_CORE::BBL_is_instrumentable_set (BBL x, BOOL y)
 
BBL_TYPE LEVEL_CORE::BBL_type (BBL x)
 
RTN LEVEL_CORE::BBL_rtn (BBL x)
 
VOID LEVEL_CORE::BBL_rtn_set (BBL x, RTN y)
 
BBL LEVEL_CORE::BBL_next (BBL x)
 
BBL LEVEL_CORE::BBL_prev (BBL x)
 
INS LEVEL_CORE::BBL_ins_head (BBL x)
 
VOID LEVEL_CORE::BBL_ins_head_set (BBL x, INS y)
 
INS LEVEL_CORE::BBL_ins_tail (BBL x)
 
VOID LEVEL_CORE::BBL_ins_tail_set (BBL x, INS y)
 
EDG LEVEL_CORE::BBL_edg_pred (BBL x)
 
VOID LEVEL_CORE::BBL_edg_pred_set (BBL x, EDG y)
 
EDG LEVEL_CORE::BBL_edg_succ (BBL x)
 
VOID LEVEL_CORE::BBL_edg_succ_set (BBL x, EDG y)
 
EXT LEVEL_CORE::BBL_ext (BBL x)
 
BOOL LEVEL_CORE::BBL_IsData (BBL bbl)
 
VOID LEVEL_CORE::BBL_pos_set (BBL x, ADDRINT y)
 
ADDRINT LEVEL_CORE::BBL_pos (BBL x)
 
VOID LEVEL_CORE::BBL_type_set (BBL x, BBL_TYPE y)
 
BOOL LEVEL_CORE::BBL_persistent (BBL x)
 
VOID LEVEL_CORE::BBL_persistent_set (BBL x)
 
LOCALINLINE VOID LEVEL_CORE::BBL_allocated_set (BBL x, BOOL y)
 
LOCALINLINE VOID LEVEL_CORE::BBL_original_set (BBL x, BOOL y)
 
LOCALINLINE VOID LEVEL_CORE::BBL_next_set (BBL x, BBL y)
 
LOCALINLINE VOID LEVEL_CORE::BBL_prev_set (BBL x, BBL y)
 
VOID LEVEL_CORE::BBL_GarbageCollect ()
 
BOOL LEVEL_CORE::BBL_MarkBblStarts (BBL containerBbl)
 
BBL LEVEL_CORE::BBL_Alloc ()
 
VOID LEVEL_CORE::BBL_Free (BBL bbl)
 
VOID LEVEL_CORE::BBL_InsertBefore (BBL bbl, BBL before, RTN parent)
 
VOID LEVEL_CORE::BBL_Append (BBL bbl, RTN parent)
 
VOID LEVEL_CORE::BBL_InsertAfter (BBL bbl, BBL after, RTN parent)
 
VOID LEVEL_CORE::BBL_Prepend (BBL bbl, RTN parent)
 
VOID LEVEL_CORE::BBL_Unlink (BBL bbl)
 
VOID LEVEL_CORE::BBL_MoveInsToBefore (const BBL src, const BBL dst, INS before)
 
VOID LEVEL_CORE::BBL_MoveInsToAfter (const BBL src, const BBL dst, INS after)
 
BBL LEVEL_CORE::BBL_Clone (BBL bbl)
 
VOID LEVEL_CORE::BBL_InitOriginal (BBL bbl)
 
LOCALFUN UINT32 LEVEL_CORE::BBL_NumAttrRegsym (BBL bbl)
 
LOCALFUN UINT32 LEVEL_CORE::BBL_NumAttrDynsym (BBL bbl)
 
UINT32 LEVEL_CORE::BBL_NumAttrCrosslink (BBL bbl)
 
VOID LEVEL_CORE::BBL_MoveAllAttributes (BBL fromBbl, BBL toBbl)
 
UINT32 LEVEL_CORE::BBL_NumIns (BBL bbl)
 
UINT32 LEVEL_CORE::BBL_ByteSize (BBL bbl)
 
LOCALVAR const ATTRIBUTE LEVEL_CORE::ATTR_bbl_entry_point ("entry","cfg","entry_point", EXT_ATTR_MODE_SINGLE, VAL_TYPE_NONE, FALSE, FALSE,"is image entry poiny")
 
BOOL LEVEL_CORE::BBL_IsImageEntryPoint (BBL bbl)
 
VOID LEVEL_CORE::BBL_SetImageEntryPoint (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsCall (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsUnconditionalCall (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsConditionalCall (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsIndirectCall (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsDirectCall (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsConditionalControlTransfer (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsDirectControlTransfer (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsIndirectControlTransfer (BBL bbl)
 
BOOL LEVEL_CORE::BBL_IsReturnSite (BBL bbl)
 
BOOL LEVEL_CORE::BBL_HasUnmodeledSuccEdges (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsUnresolvedIndirectJump (BBL bbl)
 
BOOL LEVEL_CORE::BBL_ContainsReturn (BBL bbl)
 
LOCALFUN BOOL LEVEL_CORE::CHUNK_IsSwitchTable (CHUNK chunk)
 
BOOL LEVEL_CORE::BBL_HasUnmodeledPredEdges (BBL bbl, BOOL switch_ok)
 
BBL LEVEL_CORE::BBL_UniquePredecessor (BBL bbl)
 
BOOL LEVEL_CORE::BBL_CanBeEntryPoint (BBL bbl, BOOL switch_ok)
 
VOID LEVEL_CORE::BBL_TypeSet (BBL bbl, BBL_TYPE type)
 
string LEVEL_CORE::BBL_StringShort (BBL_TYPE type)
 
string LEVEL_CORE::str (BBL bbl)
 
string LEVEL_CORE::BBL_str (BBL bbl)
 
LOCALVAR const ATTRIBUTE LEVEL_CORE::ATTR_bbl_chunk ("chunk","bbl","bbl_chunk", EXT_ATTR_MODE_SINGLE, VAL_TYPE_CHUNK, B_CROSSLINK, FALSE,"chunk crosslinked with a type data bbl")
 
CHUNK LEVEL_CORE::BBL_DataChunk (BBL bbl)
 
VOID LEVEL_CORE::BBL_DataLinkWithChunk (BBL bbl, CHUNK chunk)
 
VOID LEVEL_CORE::BBL_DataUnlinkChunk (BBL bbl)
 
string LEVEL_CORE::BBL_StringLong (BBL bbl)
 
LOCALFUN string LEVEL_CORE::BBL_dotName (BBL bbl)
 
LOCALFUN string LEVEL_CORE::BBL_dotEdge (BBL bbl, EDG edg)
 
string LEVEL_CORE::BBL_generateDotCFG (BBL bbl)
 
OADDR LEVEL_CORE::BBL_GetOaddr (BBL target)
 
string LEVEL_CORE::BBL_StringLongFancy (BBL bbl)
 
VOID LEVEL_CORE::BBL_DeleteIns (BBL bbl)
 
VOID LEVEL_CORE::BBL_FreeSuccEdges (BBL bbl)
 
VOID LEVEL_CORE::BBL_FreePredEdges (BBL bbl)
 
VOID LEVEL_CORE::BBL_FreeContents (BBL bbl)
 
VOID LEVEL_CORE::BBL_UnlinkFreeCode (BBL bbl)
 
VOID LEVEL_CORE::BBL_UnlinkFreeData (BBL bbl)
 
BBL LEVEL_CORE::BBL_SplitAtIns (BBL firstBbl, INS splitIns)
 
VOID LEVEL_CORE::BBL_CheckFree ()
 

Detailed Description

This file contains BBL primitives