Loading...
Searching...
No Matches
High Level IL

Detailed Description

Classes

class  BinaryNinja::HighLevelILFunction
 
class  BinaryNinja::LanguageRepresentationFunction
 LanguageRepresentationFunction represents a single function in a registered high level language. More...
 
class  BinaryNinja::CoreLanguageRepresentationFunction
 
class  BinaryNinja::LanguageRepresentationFunctionType
 LanguageRepresentationFunctionType represents a custom language representation function type. More...
 
class  BinaryNinja::HighLevelILTokenEmitter
 HighLevelILTokenEmitter contains methods for emitting text tokens for High Level IL instructions. More...
 
class  BinaryNinja::HighLevelILTokenEmitter::CurrentExprGuard
 
class  BinaryNinja::HighLevelILInstructionAccessException
 
class  BinaryNinja::HighLevelILIntegerList
 
class  BinaryNinja::HighLevelILIndexList
 
class  BinaryNinja::HighLevelILInstructionList
 
class  BinaryNinja::HighLevelILSSAVariableList
 
struct  BinaryNinja::HighLevelILInstructionBase
 
struct  BinaryNinja::HighLevelILInstruction
 
class  BinaryNinja::HighLevelILOperand
 
class  BinaryNinja::HighLevelILOperandList
 
struct  BinaryNinja::HighLevelILConstantInstruction
 
struct  BinaryNinja::HighLevelILConstantDataInstruction
 
struct  BinaryNinja::HighLevelILOneOperandInstruction
 
struct  BinaryNinja::HighLevelILTwoOperandInstruction
 
struct  BinaryNinja::HighLevelILTwoOperandWithCarryInstruction
 

Enumerations

enum  BinaryNinja::HighLevelILOperandType {
  BinaryNinja::IntegerHighLevelOperand , BinaryNinja::ConstantDataHighLevelOperand , BinaryNinja::IndexHighLevelOperand , BinaryNinja::IntrinsicHighLevelOperand ,
  BinaryNinja::ExprHighLevelOperand , BinaryNinja::VariableHighLevelOperand , BinaryNinja::SSAVariableHighLevelOperand , BinaryNinja::ExprListHighLevelOperand ,
  BinaryNinja::SSAVariableListHighLevelOperand , BinaryNinja::IndexListHighLevelOperand
}
 
enum  BinaryNinja::HighLevelILOperandUsage {
  BinaryNinja::SourceExprHighLevelOperandUsage , BinaryNinja::VariableHighLevelOperandUsage , BinaryNinja::DestVariableHighLevelOperandUsage , BinaryNinja::SSAVariableHighLevelOperandUsage ,
  BinaryNinja::DestSSAVariableHighLevelOperandUsage , BinaryNinja::DestExprHighLevelOperandUsage , BinaryNinja::LeftExprHighLevelOperandUsage , BinaryNinja::RightExprHighLevelOperandUsage ,
  BinaryNinja::CarryExprHighLevelOperandUsage , BinaryNinja::IndexExprHighLevelOperandUsage , BinaryNinja::ConditionExprHighLevelOperandUsage , BinaryNinja::ConditionPhiExprHighLevelOperandUsage ,
  BinaryNinja::TrueExprHighLevelOperandUsage , BinaryNinja::FalseExprHighLevelOperandUsage , BinaryNinja::LoopExprHighLevelOperandUsage , BinaryNinja::InitExprHighLevelOperandUsage ,
  BinaryNinja::UpdateExprHighLevelOperandUsage , BinaryNinja::DefaultExprHighLevelOperandUsage , BinaryNinja::HighExprHighLevelOperandUsage , BinaryNinja::LowExprHighLevelOperandUsage ,
  BinaryNinja::OffsetHighLevelOperandUsage , BinaryNinja::MemberIndexHighLevelOperandUsage , BinaryNinja::ConstantHighLevelOperandUsage , BinaryNinja::ConstantDataHighLevelOperandUsage ,
  BinaryNinja::VectorHighLevelOperandUsage , BinaryNinja::IntrinsicHighLevelOperandUsage , BinaryNinja::TargetHighLevelOperandUsage , BinaryNinja::ParameterExprsHighLevelOperandUsage ,
  BinaryNinja::SourceExprsHighLevelOperandUsage , BinaryNinja::DestExprsHighLevelOperandUsage , BinaryNinja::BlockExprsHighLevelOperandUsage , BinaryNinja::CasesHighLevelOperandUsage ,
  BinaryNinja::ValueExprsHighLevelOperandUsage , BinaryNinja::SourceSSAVariablesHighLevelOperandUsage , BinaryNinja::SourceMemoryVersionHighLevelOperandUsage , BinaryNinja::SourceMemoryVersionsHighLevelOperandUsage ,
  BinaryNinja::DestMemoryVersionHighLevelOperandUsage
}
 

Class Documentation

◆ BinaryNinja::HighLevelILFunction

class BinaryNinja::HighLevelILFunction

Public Member Functions

 HighLevelILFunction (Architecture *arch, Function *func=nullptr)
 
 HighLevelILFunction (BNHighLevelILFunction *func)
 
Ref< FunctionGetFunction () const
 
Ref< ArchitectureGetArchitecture () const
 
uint64_t GetCurrentAddress () const
 
void SetCurrentAddress (Architecture *arch, uint64_t addr)
 
HighLevelILInstruction GetRootExpr ()
 
void SetRootExpr (ExprId expr)
 
void SetRootExpr (const HighLevelILInstruction &expr)
 
ExprId AddExpr (BNHighLevelILOperation operation, size_t size, ExprId a=0, ExprId b=0, ExprId c=0, ExprId d=0, ExprId e=0)
 
ExprId AddExprWithLocation (BNHighLevelILOperation operation, uint64_t addr, uint32_t sourceOperand, size_t size, ExprId a=0, ExprId b=0, ExprId c=0, ExprId d=0, ExprId e=0)
 
ExprId AddExprWithLocation (BNHighLevelILOperation operation, const ILSourceLocation &loc, size_t size, ExprId a=0, ExprId b=0, ExprId c=0, ExprId d=0, ExprId e=0)
 
ExprId Nop (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Block (const std::vector< ExprId > &exprs, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId If (ExprId condition, ExprId trueExpr, ExprId falseExpr, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId While (ExprId condition, ExprId loopExpr, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId WhileSSA (ExprId conditionPhi, ExprId condition, ExprId loopExpr, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DoWhile (ExprId loopExpr, ExprId condition, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DoWhileSSA (ExprId loopExpr, ExprId conditionPhi, ExprId condition, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId For (ExprId initExpr, ExprId condition, ExprId updateExpr, ExprId loopExpr, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ForSSA (ExprId initExpr, ExprId conditionPhi, ExprId condition, ExprId updateExpr, ExprId loopExpr, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Switch (ExprId condition, ExprId defaultExpr, const std::vector< ExprId > &cases, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Case (const std::vector< ExprId > &condition, ExprId expr, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Break (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Continue (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Jump (ExprId dest, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Return (const std::vector< ExprId > &sources, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId NoReturn (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Unreachable (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Goto (uint64_t target, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Label (uint64_t target, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId VarDeclare (const Variable &var, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId VarInit (size_t size, const Variable &dest, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId VarInitSSA (size_t size, const SSAVariable &dest, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Assign (size_t size, ExprId dest, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId AssignUnpack (const std::vector< ExprId > &output, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId AssignMemSSA (size_t size, ExprId dest, size_t destMemVersion, ExprId src, size_t srcMemVersion, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId AssignUnpackMemSSA (const std::vector< ExprId > &output, size_t destMemVersion, ExprId src, size_t srcMemVersion, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Var (size_t size, const Variable &src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId VarSSA (size_t size, const SSAVariable &src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId VarPhi (const SSAVariable &dest, const std::vector< SSAVariable > &sources, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId MemPhi (size_t dest, const std::vector< size_t > &sources, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId StructField (size_t size, ExprId src, uint64_t offset, size_t memberIndex, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ArrayIndex (size_t size, ExprId src, ExprId idx, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ArrayIndexSSA (size_t size, ExprId src, size_t srcMemVersion, ExprId idx, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Split (size_t size, ExprId high, ExprId low, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Deref (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DerefField (size_t size, ExprId src, uint64_t offset, size_t memberIndex, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DerefSSA (size_t size, ExprId src, size_t srcMemVersion, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DerefFieldSSA (size_t size, ExprId src, size_t srcMemVersion, uint64_t offset, size_t memberIndex, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId AddressOf (ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Const (size_t size, uint64_t val, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ConstPointer (size_t size, uint64_t val, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ExternPointer (size_t size, uint64_t val, uint64_t offset, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatConstRaw (size_t size, uint64_t val, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatConstSingle (float val, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatConstDouble (double val, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ImportedAddress (size_t size, uint64_t val, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ConstData (size_t size, const ConstantData &data, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Add (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId AddWithCarry (size_t size, ExprId left, ExprId right, ExprId carry, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Sub (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId SubWithBorrow (size_t size, ExprId left, ExprId right, ExprId carry, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId And (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Or (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Xor (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ShiftLeft (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId LogicalShiftRight (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ArithShiftRight (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId RotateLeft (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId RotateLeftCarry (size_t size, ExprId left, ExprId right, ExprId carry, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId RotateRight (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId RotateRightCarry (size_t size, ExprId left, ExprId right, ExprId carry, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Mult (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId MultDoublePrecSigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId MultDoublePrecUnsigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DivSigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DivUnsigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DivDoublePrecSigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId DivDoublePrecUnsigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ModSigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ModUnsigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ModDoublePrecSigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ModDoublePrecUnsigned (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Neg (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Not (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId SignExtend (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId ZeroExtend (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId LowPart (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Call (ExprId dest, const std::vector< ExprId > &params, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Syscall (const std::vector< ExprId > &params, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId TailCall (ExprId dest, const std::vector< ExprId > &params, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CallSSA (ExprId dest, const std::vector< ExprId > &params, size_t destMemVersion, size_t srcMemVersion, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId SyscallSSA (const std::vector< ExprId > &params, size_t destMemVersion, size_t srcMemVersion, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareEqual (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareNotEqual (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareSignedLessThan (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareUnsignedLessThan (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareSignedLessEqual (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareUnsignedLessEqual (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareSignedGreaterEqual (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareUnsignedGreaterEqual (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareSignedGreaterThan (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId CompareUnsignedGreaterThan (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId TestBit (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId BoolToInt (size_t size, ExprId src, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId AddOverflow (size_t size, ExprId left, ExprId right, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Breakpoint (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Trap (int64_t vector, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Intrinsic (uint32_t intrinsic, const std::vector< ExprId > &params, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId IntrinsicSSA (uint32_t intrinsic, const std::vector< ExprId > &params, size_t destMemVersion, size_t srcMemVersion, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Undefined (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Unimplemented (const ILSourceLocation &loc=ILSourceLocation())
 
ExprId UnimplementedMemoryRef (size_t size, ExprId target, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatAdd (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatSub (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatMult (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatDiv (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatSqrt (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatNeg (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatAbs (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatToInt (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId IntToFloat (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatConvert (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId RoundToInt (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Floor (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId Ceil (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatTrunc (size_t size, ExprId a, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareEqual (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareNotEqual (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareLessThan (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareLessEqual (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareGreaterEqual (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareGreaterThan (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareOrdered (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
ExprId FloatCompareUnordered (size_t size, ExprId a, ExprId b, const ILSourceLocation &loc=ILSourceLocation())
 
std::vector< uint64_t > GetOperandList (ExprId i, size_t listOperand)
 
ExprId AddOperandList (const std::vector< ExprId > &operands)
 
ExprId AddIndexList (const std::vector< size_t > &operands)
 
ExprId AddSSAVariableList (const std::vector< SSAVariable > &vars)
 
BNHighLevelILInstruction GetRawExpr (size_t i) const
 
BNHighLevelILInstruction GetRawNonASTExpr (size_t i) const
 
HighLevelILInstruction operator[] (size_t i)
 
HighLevelILInstruction GetInstruction (size_t i)
 
HighLevelILInstruction GetExpr (size_t i, bool asFullAst=true)
 
size_t GetIndexForInstruction (size_t i) const
 
size_t GetInstructionForExpr (size_t expr) const
 
size_t GetInstructionCount () const
 
size_t GetExprCount () const
 
std::vector< Ref< BasicBlock > > GetBasicBlocks () const
 
Ref< BasicBlockGetBasicBlockForInstruction (size_t i) const
 
Ref< HighLevelILFunctionGetSSAForm () const
 
Ref< HighLevelILFunctionGetNonSSAForm () const
 
size_t GetSSAInstructionIndex (size_t instr) const
 
size_t GetNonSSAInstructionIndex (size_t instr) const
 
size_t GetSSAExprIndex (size_t instr) const
 
size_t GetNonSSAExprIndex (size_t instr) const
 
size_t GetSSAVarDefinition (const SSAVariable &var) const
 
size_t GetSSAMemoryDefinition (size_t version) const
 
std::set< size_t > GetSSAVarUses (const SSAVariable &var) const
 
std::set< size_t > GetSSAMemoryUses (size_t version) const
 
bool IsSSAVarLive (const SSAVariable &var) const
 
bool IsSSAVarLiveAt (const SSAVariable &var, const size_t instr) const
 
bool IsVarLiveAt (const Variable &var, const size_t instr) const
 
std::set< size_t > GetVariableSSAVersions (const Variable &var) const
 
std::set< size_t > GetVariableDefinitions (const Variable &var) const
 
std::set< size_t > GetVariableUses (const Variable &var) const
 
size_t GetSSAVarVersionAtInstruction (const Variable &var, size_t instr) const
 
size_t GetSSAMemoryVersionAtInstruction (size_t instr) const
 
Ref< MediumLevelILFunctionGetMediumLevelIL () const
 
size_t GetMediumLevelILExprIndex (size_t expr) const
 
std::set< size_t > GetMediumLevelILExprIndexes (size_t expr) const
 
void UpdateInstructionOperand (size_t i, size_t operandIndex, ExprId value)
 
void ReplaceExpr (size_t expr, size_t newExpr)
 
void SetExprAttributes (size_t expr, uint32_t attributes)
 
void Finalize ()
 
void GenerateSSAForm (const std::set< Variable > &aliases=std::set< Variable >())
 
std::vector< DisassemblyTextLineGetExprText (ExprId expr, bool asFullAst=true, DisassemblySettings *settings=nullptr)
 
std::vector< DisassemblyTextLineGetExprText (const HighLevelILInstruction &instr, DisassemblySettings *settings=nullptr)
 
std::vector< DisassemblyTextLineGetInstructionText (size_t i, DisassemblySettings *settings=nullptr)
 
Confidence< Ref< Type > > GetExprType (size_t expr)
 
Confidence< Ref< Type > > GetExprType (const HighLevelILInstruction &expr)
 
void SetExprType (size_t expr, const Confidence< Ref< Type > > &type)
 SetExprType sets the type of a given expression.
 
void SetExprType (const HighLevelILInstruction &expr, const Confidence< Ref< Type > > &type)
 
void VisitAllExprs (const std::function< bool(const HighLevelILInstruction &expr)> &func)
 
Ref< FlowGraphCreateFunctionGraph (DisassemblySettings *settings=nullptr)
 
size_t GetExprIndexForLabel (uint64_t label)
 
std::set< size_t > GetUsesForLabel (uint64_t label)
 
std::set< VariableGetVariables ()
 
std::set< VariableGetAliasedVariables ()
 
std::set< SSAVariableGetSSAVariables ()
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNHighLevelILFunction, BNNewHighLevelILFunctionReference, BNFreeHighLevelILFunction >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNHighLevelILFunctionGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static bool HasSideEffects (const HighLevelILInstruction &instr)
 
static BNScopeType GetExprScopeType (const HighLevelILInstruction &instr)
 
- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNHighLevelILFunction, BNNewHighLevelILFunctionReference, BNFreeHighLevelILFunction >
static BNHighLevelILFunctionGetObject (CoreRefCountObject *obj)
 
static BNHighLevelILFunctionGetObject (const CoreRefCountObject *obj)
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNHighLevelILFunction, BNNewHighLevelILFunctionReference, BNFreeHighLevelILFunction >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNHighLevelILFunctionm_object
 

Constructor & Destructor Documentation

◆ HighLevelILFunction() [1/2]

HighLevelILFunction::HighLevelILFunction ( Architecture * arch,
Function * func = nullptr )

◆ HighLevelILFunction() [2/2]

HighLevelILFunction::HighLevelILFunction ( BNHighLevelILFunction * func)

Member Function Documentation

◆ GetFunction()

Ref< Function > HighLevelILFunction::GetFunction ( ) const

◆ GetArchitecture()

Ref< Architecture > HighLevelILFunction::GetArchitecture ( ) const

◆ GetCurrentAddress()

uint64_t HighLevelILFunction::GetCurrentAddress ( ) const

◆ SetCurrentAddress()

void HighLevelILFunction::SetCurrentAddress ( Architecture * arch,
uint64_t addr )

◆ GetRootExpr()

HighLevelILInstruction HighLevelILFunction::GetRootExpr ( )

◆ SetRootExpr() [1/2]

void HighLevelILFunction::SetRootExpr ( ExprId expr)

◆ SetRootExpr() [2/2]

void HighLevelILFunction::SetRootExpr ( const HighLevelILInstruction & expr)

◆ AddExpr()

ExprId HighLevelILFunction::AddExpr ( BNHighLevelILOperation operation,
size_t size,
ExprId a = 0,
ExprId b = 0,
ExprId c = 0,
ExprId d = 0,
ExprId e = 0 )

◆ AddExprWithLocation() [1/2]

ExprId HighLevelILFunction::AddExprWithLocation ( BNHighLevelILOperation operation,
uint64_t addr,
uint32_t sourceOperand,
size_t size,
ExprId a = 0,
ExprId b = 0,
ExprId c = 0,
ExprId d = 0,
ExprId e = 0 )

◆ AddExprWithLocation() [2/2]

ExprId HighLevelILFunction::AddExprWithLocation ( BNHighLevelILOperation operation,
const ILSourceLocation & loc,
size_t size,
ExprId a = 0,
ExprId b = 0,
ExprId c = 0,
ExprId d = 0,
ExprId e = 0 )

◆ Nop()

ExprId HighLevelILFunction::Nop ( const ILSourceLocation & loc = ILSourceLocation())

◆ Block()

ExprId HighLevelILFunction::Block ( const std::vector< ExprId > & exprs,
const ILSourceLocation & loc = ILSourceLocation() )

◆ If()

ExprId HighLevelILFunction::If ( ExprId condition,
ExprId trueExpr,
ExprId falseExpr,
const ILSourceLocation & loc = ILSourceLocation() )

◆ While()

ExprId HighLevelILFunction::While ( ExprId condition,
ExprId loopExpr,
const ILSourceLocation & loc = ILSourceLocation() )

◆ WhileSSA()

ExprId HighLevelILFunction::WhileSSA ( ExprId conditionPhi,
ExprId condition,
ExprId loopExpr,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DoWhile()

ExprId HighLevelILFunction::DoWhile ( ExprId loopExpr,
ExprId condition,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DoWhileSSA()

ExprId HighLevelILFunction::DoWhileSSA ( ExprId loopExpr,
ExprId conditionPhi,
ExprId condition,
const ILSourceLocation & loc = ILSourceLocation() )

◆ For()

ExprId HighLevelILFunction::For ( ExprId initExpr,
ExprId condition,
ExprId updateExpr,
ExprId loopExpr,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ForSSA()

ExprId HighLevelILFunction::ForSSA ( ExprId initExpr,
ExprId conditionPhi,
ExprId condition,
ExprId updateExpr,
ExprId loopExpr,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Switch()

ExprId HighLevelILFunction::Switch ( ExprId condition,
ExprId defaultExpr,
const std::vector< ExprId > & cases,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Case()

ExprId HighLevelILFunction::Case ( const std::vector< ExprId > & condition,
ExprId expr,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Break()

ExprId HighLevelILFunction::Break ( const ILSourceLocation & loc = ILSourceLocation())

◆ Continue()

ExprId HighLevelILFunction::Continue ( const ILSourceLocation & loc = ILSourceLocation())

◆ Jump()

ExprId HighLevelILFunction::Jump ( ExprId dest,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Return()

ExprId HighLevelILFunction::Return ( const std::vector< ExprId > & sources,
const ILSourceLocation & loc = ILSourceLocation() )

◆ NoReturn()

ExprId HighLevelILFunction::NoReturn ( const ILSourceLocation & loc = ILSourceLocation())

◆ Unreachable()

ExprId HighLevelILFunction::Unreachable ( const ILSourceLocation & loc = ILSourceLocation())

◆ Goto()

ExprId HighLevelILFunction::Goto ( uint64_t target,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Label()

ExprId HighLevelILFunction::Label ( uint64_t target,
const ILSourceLocation & loc = ILSourceLocation() )

◆ VarDeclare()

ExprId HighLevelILFunction::VarDeclare ( const Variable & var,
const ILSourceLocation & loc = ILSourceLocation() )

◆ VarInit()

ExprId HighLevelILFunction::VarInit ( size_t size,
const Variable & dest,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ VarInitSSA()

ExprId HighLevelILFunction::VarInitSSA ( size_t size,
const SSAVariable & dest,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Assign()

ExprId HighLevelILFunction::Assign ( size_t size,
ExprId dest,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ AssignUnpack()

ExprId HighLevelILFunction::AssignUnpack ( const std::vector< ExprId > & output,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ AssignMemSSA()

ExprId HighLevelILFunction::AssignMemSSA ( size_t size,
ExprId dest,
size_t destMemVersion,
ExprId src,
size_t srcMemVersion,
const ILSourceLocation & loc = ILSourceLocation() )

◆ AssignUnpackMemSSA()

ExprId HighLevelILFunction::AssignUnpackMemSSA ( const std::vector< ExprId > & output,
size_t destMemVersion,
ExprId src,
size_t srcMemVersion,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Var()

ExprId HighLevelILFunction::Var ( size_t size,
const Variable & src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ VarSSA()

ExprId HighLevelILFunction::VarSSA ( size_t size,
const SSAVariable & src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ VarPhi()

ExprId HighLevelILFunction::VarPhi ( const SSAVariable & dest,
const std::vector< SSAVariable > & sources,
const ILSourceLocation & loc = ILSourceLocation() )

◆ MemPhi()

ExprId HighLevelILFunction::MemPhi ( size_t dest,
const std::vector< size_t > & sources,
const ILSourceLocation & loc = ILSourceLocation() )

◆ StructField()

ExprId HighLevelILFunction::StructField ( size_t size,
ExprId src,
uint64_t offset,
size_t memberIndex,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ArrayIndex()

ExprId HighLevelILFunction::ArrayIndex ( size_t size,
ExprId src,
ExprId idx,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ArrayIndexSSA()

ExprId HighLevelILFunction::ArrayIndexSSA ( size_t size,
ExprId src,
size_t srcMemVersion,
ExprId idx,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Split()

ExprId HighLevelILFunction::Split ( size_t size,
ExprId high,
ExprId low,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Deref()

ExprId HighLevelILFunction::Deref ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DerefField()

ExprId HighLevelILFunction::DerefField ( size_t size,
ExprId src,
uint64_t offset,
size_t memberIndex,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DerefSSA()

ExprId HighLevelILFunction::DerefSSA ( size_t size,
ExprId src,
size_t srcMemVersion,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DerefFieldSSA()

ExprId HighLevelILFunction::DerefFieldSSA ( size_t size,
ExprId src,
size_t srcMemVersion,
uint64_t offset,
size_t memberIndex,
const ILSourceLocation & loc = ILSourceLocation() )

◆ AddressOf()

ExprId HighLevelILFunction::AddressOf ( ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Const()

ExprId HighLevelILFunction::Const ( size_t size,
uint64_t val,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ConstPointer()

ExprId HighLevelILFunction::ConstPointer ( size_t size,
uint64_t val,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ExternPointer()

ExprId HighLevelILFunction::ExternPointer ( size_t size,
uint64_t val,
uint64_t offset,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatConstRaw()

ExprId HighLevelILFunction::FloatConstRaw ( size_t size,
uint64_t val,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatConstSingle()

ExprId HighLevelILFunction::FloatConstSingle ( float val,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatConstDouble()

ExprId HighLevelILFunction::FloatConstDouble ( double val,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ImportedAddress()

ExprId HighLevelILFunction::ImportedAddress ( size_t size,
uint64_t val,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ConstData()

ExprId HighLevelILFunction::ConstData ( size_t size,
const ConstantData & data,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Add()

ExprId HighLevelILFunction::Add ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ AddWithCarry()

ExprId HighLevelILFunction::AddWithCarry ( size_t size,
ExprId left,
ExprId right,
ExprId carry,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Sub()

ExprId HighLevelILFunction::Sub ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ SubWithBorrow()

ExprId HighLevelILFunction::SubWithBorrow ( size_t size,
ExprId left,
ExprId right,
ExprId carry,
const ILSourceLocation & loc = ILSourceLocation() )

◆ And()

ExprId HighLevelILFunction::And ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Or()

ExprId HighLevelILFunction::Or ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Xor()

ExprId HighLevelILFunction::Xor ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ShiftLeft()

ExprId HighLevelILFunction::ShiftLeft ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ LogicalShiftRight()

ExprId HighLevelILFunction::LogicalShiftRight ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ArithShiftRight()

ExprId HighLevelILFunction::ArithShiftRight ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ RotateLeft()

ExprId HighLevelILFunction::RotateLeft ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ RotateLeftCarry()

ExprId HighLevelILFunction::RotateLeftCarry ( size_t size,
ExprId left,
ExprId right,
ExprId carry,
const ILSourceLocation & loc = ILSourceLocation() )

◆ RotateRight()

ExprId HighLevelILFunction::RotateRight ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ RotateRightCarry()

ExprId HighLevelILFunction::RotateRightCarry ( size_t size,
ExprId left,
ExprId right,
ExprId carry,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Mult()

ExprId HighLevelILFunction::Mult ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ MultDoublePrecSigned()

ExprId HighLevelILFunction::MultDoublePrecSigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ MultDoublePrecUnsigned()

ExprId HighLevelILFunction::MultDoublePrecUnsigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DivSigned()

ExprId HighLevelILFunction::DivSigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DivUnsigned()

ExprId HighLevelILFunction::DivUnsigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DivDoublePrecSigned()

ExprId HighLevelILFunction::DivDoublePrecSigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ DivDoublePrecUnsigned()

ExprId HighLevelILFunction::DivDoublePrecUnsigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ModSigned()

ExprId HighLevelILFunction::ModSigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ModUnsigned()

ExprId HighLevelILFunction::ModUnsigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ModDoublePrecSigned()

ExprId HighLevelILFunction::ModDoublePrecSigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ModDoublePrecUnsigned()

ExprId HighLevelILFunction::ModDoublePrecUnsigned ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Neg()

ExprId HighLevelILFunction::Neg ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Not()

ExprId HighLevelILFunction::Not ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ SignExtend()

ExprId HighLevelILFunction::SignExtend ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ ZeroExtend()

ExprId HighLevelILFunction::ZeroExtend ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ LowPart()

ExprId HighLevelILFunction::LowPart ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Call()

ExprId HighLevelILFunction::Call ( ExprId dest,
const std::vector< ExprId > & params,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Syscall()

ExprId HighLevelILFunction::Syscall ( const std::vector< ExprId > & params,
const ILSourceLocation & loc = ILSourceLocation() )

◆ TailCall()

ExprId HighLevelILFunction::TailCall ( ExprId dest,
const std::vector< ExprId > & params,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CallSSA()

ExprId HighLevelILFunction::CallSSA ( ExprId dest,
const std::vector< ExprId > & params,
size_t destMemVersion,
size_t srcMemVersion,
const ILSourceLocation & loc = ILSourceLocation() )

◆ SyscallSSA()

ExprId HighLevelILFunction::SyscallSSA ( const std::vector< ExprId > & params,
size_t destMemVersion,
size_t srcMemVersion,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareEqual()

ExprId HighLevelILFunction::CompareEqual ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareNotEqual()

ExprId HighLevelILFunction::CompareNotEqual ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareSignedLessThan()

ExprId HighLevelILFunction::CompareSignedLessThan ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareUnsignedLessThan()

ExprId HighLevelILFunction::CompareUnsignedLessThan ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareSignedLessEqual()

ExprId HighLevelILFunction::CompareSignedLessEqual ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareUnsignedLessEqual()

ExprId HighLevelILFunction::CompareUnsignedLessEqual ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareSignedGreaterEqual()

ExprId HighLevelILFunction::CompareSignedGreaterEqual ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareUnsignedGreaterEqual()

ExprId HighLevelILFunction::CompareUnsignedGreaterEqual ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareSignedGreaterThan()

ExprId HighLevelILFunction::CompareSignedGreaterThan ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ CompareUnsignedGreaterThan()

ExprId HighLevelILFunction::CompareUnsignedGreaterThan ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ TestBit()

ExprId HighLevelILFunction::TestBit ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ BoolToInt()

ExprId HighLevelILFunction::BoolToInt ( size_t size,
ExprId src,
const ILSourceLocation & loc = ILSourceLocation() )

◆ AddOverflow()

ExprId HighLevelILFunction::AddOverflow ( size_t size,
ExprId left,
ExprId right,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Breakpoint()

ExprId HighLevelILFunction::Breakpoint ( const ILSourceLocation & loc = ILSourceLocation())

◆ Trap()

ExprId HighLevelILFunction::Trap ( int64_t vector,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Intrinsic()

ExprId HighLevelILFunction::Intrinsic ( uint32_t intrinsic,
const std::vector< ExprId > & params,
const ILSourceLocation & loc = ILSourceLocation() )

◆ IntrinsicSSA()

ExprId HighLevelILFunction::IntrinsicSSA ( uint32_t intrinsic,
const std::vector< ExprId > & params,
size_t destMemVersion,
size_t srcMemVersion,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Undefined()

ExprId HighLevelILFunction::Undefined ( const ILSourceLocation & loc = ILSourceLocation())

◆ Unimplemented()

ExprId HighLevelILFunction::Unimplemented ( const ILSourceLocation & loc = ILSourceLocation())

◆ UnimplementedMemoryRef()

ExprId HighLevelILFunction::UnimplementedMemoryRef ( size_t size,
ExprId target,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatAdd()

ExprId HighLevelILFunction::FloatAdd ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatSub()

ExprId HighLevelILFunction::FloatSub ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatMult()

ExprId HighLevelILFunction::FloatMult ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatDiv()

ExprId HighLevelILFunction::FloatDiv ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatSqrt()

ExprId HighLevelILFunction::FloatSqrt ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatNeg()

ExprId HighLevelILFunction::FloatNeg ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatAbs()

ExprId HighLevelILFunction::FloatAbs ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatToInt()

ExprId HighLevelILFunction::FloatToInt ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ IntToFloat()

ExprId HighLevelILFunction::IntToFloat ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatConvert()

ExprId HighLevelILFunction::FloatConvert ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ RoundToInt()

ExprId HighLevelILFunction::RoundToInt ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Floor()

ExprId HighLevelILFunction::Floor ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ Ceil()

ExprId HighLevelILFunction::Ceil ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatTrunc()

ExprId HighLevelILFunction::FloatTrunc ( size_t size,
ExprId a,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareEqual()

ExprId HighLevelILFunction::FloatCompareEqual ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareNotEqual()

ExprId HighLevelILFunction::FloatCompareNotEqual ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareLessThan()

ExprId HighLevelILFunction::FloatCompareLessThan ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareLessEqual()

ExprId HighLevelILFunction::FloatCompareLessEqual ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareGreaterEqual()

ExprId HighLevelILFunction::FloatCompareGreaterEqual ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareGreaterThan()

ExprId HighLevelILFunction::FloatCompareGreaterThan ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareOrdered()

ExprId HighLevelILFunction::FloatCompareOrdered ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ FloatCompareUnordered()

ExprId HighLevelILFunction::FloatCompareUnordered ( size_t size,
ExprId a,
ExprId b,
const ILSourceLocation & loc = ILSourceLocation() )

◆ GetOperandList()

vector< uint64_t > HighLevelILFunction::GetOperandList ( ExprId i,
size_t listOperand )

◆ AddOperandList()

ExprId HighLevelILFunction::AddOperandList ( const std::vector< ExprId > & operands)

◆ AddIndexList()

ExprId HighLevelILFunction::AddIndexList ( const std::vector< size_t > & operands)

◆ AddSSAVariableList()

ExprId HighLevelILFunction::AddSSAVariableList ( const std::vector< SSAVariable > & vars)

◆ GetRawExpr()

BNHighLevelILInstruction HighLevelILFunction::GetRawExpr ( size_t i) const

◆ GetRawNonASTExpr()

BNHighLevelILInstruction HighLevelILFunction::GetRawNonASTExpr ( size_t i) const

◆ operator[]()

HighLevelILInstruction HighLevelILFunction::operator[] ( size_t i)

◆ GetInstruction()

HighLevelILInstruction HighLevelILFunction::GetInstruction ( size_t i)

◆ GetExpr()

HighLevelILInstruction HighLevelILFunction::GetExpr ( size_t i,
bool asFullAst = true )

◆ GetIndexForInstruction()

size_t HighLevelILFunction::GetIndexForInstruction ( size_t i) const

◆ GetInstructionForExpr()

size_t HighLevelILFunction::GetInstructionForExpr ( size_t expr) const

◆ GetInstructionCount()

size_t HighLevelILFunction::GetInstructionCount ( ) const

◆ GetExprCount()

size_t HighLevelILFunction::GetExprCount ( ) const

◆ GetBasicBlocks()

vector< Ref< BasicBlock > > HighLevelILFunction::GetBasicBlocks ( ) const

◆ GetBasicBlockForInstruction()

Ref< BasicBlock > HighLevelILFunction::GetBasicBlockForInstruction ( size_t i) const

◆ GetSSAForm()

Ref< HighLevelILFunction > HighLevelILFunction::GetSSAForm ( ) const

◆ GetNonSSAForm()

Ref< HighLevelILFunction > HighLevelILFunction::GetNonSSAForm ( ) const

◆ GetSSAInstructionIndex()

size_t HighLevelILFunction::GetSSAInstructionIndex ( size_t instr) const

◆ GetNonSSAInstructionIndex()

size_t HighLevelILFunction::GetNonSSAInstructionIndex ( size_t instr) const

◆ GetSSAExprIndex()

size_t HighLevelILFunction::GetSSAExprIndex ( size_t instr) const

◆ GetNonSSAExprIndex()

size_t HighLevelILFunction::GetNonSSAExprIndex ( size_t instr) const

◆ GetSSAVarDefinition()

size_t HighLevelILFunction::GetSSAVarDefinition ( const SSAVariable & var) const

◆ GetSSAMemoryDefinition()

size_t HighLevelILFunction::GetSSAMemoryDefinition ( size_t version) const

◆ GetSSAVarUses()

set< size_t > HighLevelILFunction::GetSSAVarUses ( const SSAVariable & var) const

◆ GetSSAMemoryUses()

set< size_t > HighLevelILFunction::GetSSAMemoryUses ( size_t version) const

◆ IsSSAVarLive()

bool HighLevelILFunction::IsSSAVarLive ( const SSAVariable & var) const

◆ IsSSAVarLiveAt()

bool HighLevelILFunction::IsSSAVarLiveAt ( const SSAVariable & var,
const size_t instr ) const

◆ IsVarLiveAt()

bool HighLevelILFunction::IsVarLiveAt ( const Variable & var,
const size_t instr ) const

◆ HasSideEffects()

bool HighLevelILFunction::HasSideEffects ( const HighLevelILInstruction & instr)
static

◆ GetExprScopeType()

BNScopeType HighLevelILFunction::GetExprScopeType ( const HighLevelILInstruction & instr)
static

◆ GetVariableSSAVersions()

set< size_t > HighLevelILFunction::GetVariableSSAVersions ( const Variable & var) const

◆ GetVariableDefinitions()

set< size_t > HighLevelILFunction::GetVariableDefinitions ( const Variable & var) const

◆ GetVariableUses()

set< size_t > HighLevelILFunction::GetVariableUses ( const Variable & var) const

◆ GetSSAVarVersionAtInstruction()

size_t HighLevelILFunction::GetSSAVarVersionAtInstruction ( const Variable & var,
size_t instr ) const

◆ GetSSAMemoryVersionAtInstruction()

size_t HighLevelILFunction::GetSSAMemoryVersionAtInstruction ( size_t instr) const

◆ GetMediumLevelIL()

Ref< MediumLevelILFunction > HighLevelILFunction::GetMediumLevelIL ( ) const

◆ GetMediumLevelILExprIndex()

size_t HighLevelILFunction::GetMediumLevelILExprIndex ( size_t expr) const

◆ GetMediumLevelILExprIndexes()

set< size_t > HighLevelILFunction::GetMediumLevelILExprIndexes ( size_t expr) const

◆ UpdateInstructionOperand()

void HighLevelILFunction::UpdateInstructionOperand ( size_t i,
size_t operandIndex,
ExprId value )

◆ ReplaceExpr()

void HighLevelILFunction::ReplaceExpr ( size_t expr,
size_t newExpr )

◆ SetExprAttributes()

void HighLevelILFunction::SetExprAttributes ( size_t expr,
uint32_t attributes )

◆ Finalize()

void HighLevelILFunction::Finalize ( )

◆ GenerateSSAForm()

void HighLevelILFunction::GenerateSSAForm ( const std::set< Variable > & aliases = std::set<Variable>())

◆ GetExprText() [1/2]

vector< DisassemblyTextLine > HighLevelILFunction::GetExprText ( ExprId expr,
bool asFullAst = true,
DisassemblySettings * settings = nullptr )

◆ GetExprText() [2/2]

vector< DisassemblyTextLine > HighLevelILFunction::GetExprText ( const HighLevelILInstruction & instr,
DisassemblySettings * settings = nullptr )

◆ GetInstructionText()

vector< DisassemblyTextLine > HighLevelILFunction::GetInstructionText ( size_t i,
DisassemblySettings * settings = nullptr )

◆ GetExprType() [1/2]

Confidence< Ref< Type > > HighLevelILFunction::GetExprType ( size_t expr)

◆ GetExprType() [2/2]

Confidence< Ref< Type > > HighLevelILFunction::GetExprType ( const HighLevelILInstruction & expr)

◆ SetExprType() [1/2]

void HighLevelILFunction::SetExprType ( size_t expr,
const Confidence< Ref< Type > > & type )

SetExprType sets the type of a given expression.

Warning
This method is only meant for workflows or for debugging purposes, since the changes they make are not persistent and get lost after a database save and reload. To make persistent changes to the analysis, one should use other APIs to, for example, change the type of variables. The analysis will then propagate the type of the variable and update the type of related expressions.
Parameters
exprindex of the expression to set
typenew type of the expression

◆ SetExprType() [2/2]

void HighLevelILFunction::SetExprType ( const HighLevelILInstruction & expr,
const Confidence< Ref< Type > > & type )

◆ VisitAllExprs()

void HighLevelILFunction::VisitAllExprs ( const std::function< bool(const HighLevelILInstruction &expr)> & func)

◆ CreateFunctionGraph()

Ref< FlowGraph > HighLevelILFunction::CreateFunctionGraph ( DisassemblySettings * settings = nullptr)

◆ GetExprIndexForLabel()

size_t HighLevelILFunction::GetExprIndexForLabel ( uint64_t label)

◆ GetUsesForLabel()

set< size_t > HighLevelILFunction::GetUsesForLabel ( uint64_t label)

◆ GetVariables()

set< Variable > HighLevelILFunction::GetVariables ( )

◆ GetAliasedVariables()

set< Variable > HighLevelILFunction::GetAliasedVariables ( )

◆ GetSSAVariables()

set< SSAVariable > HighLevelILFunction::GetSSAVariables ( )

◆ BinaryNinja::LanguageRepresentationFunction

class BinaryNinja::LanguageRepresentationFunction

LanguageRepresentationFunction represents a single function in a registered high level language.

Public Member Functions

 LanguageRepresentationFunction (Architecture *arch, Function *func, HighLevelILFunction *highLevelIL)
 
 LanguageRepresentationFunction (BNLanguageRepresentationFunction *func)
 
std::vector< DisassemblyTextLineGetExprText (const HighLevelILInstruction &instr, DisassemblySettings *settings, BNOperatorPrecedence precedence=TopLevelOperatorPrecedence, bool statement=false)
 Gets the lines of tokens for a given High Level IL instruction.
 
std::vector< DisassemblyTextLineGetLinearLines (const HighLevelILInstruction &instr, DisassemblySettings *settings)
 Generates lines for the given High Level IL instruction in the style of the linear view.
 
std::vector< DisassemblyTextLineGetBlockLines (BasicBlock *block, DisassemblySettings *settings)
 Generates lines for a single High Level IL basic block.
 
BNHighlightColor GetHighlight (BasicBlock *block)
 Gets the highlight color for a given basic block.
 
Ref< ArchitectureGetArchitecture () const
 
Ref< FunctionGetFunction () const
 
Ref< HighLevelILFunctionGetHighLevelILFunction () const
 
virtual std::string GetCommentStartString () const
 Gets the string representing the start of a comment.
 
virtual std::string GetCommentEndString () const
 Gets the string representing the end of a comment.
 
virtual std::string GetAnnotationStartString () const
 Gets the string representing the start of an annotation.
 
virtual std::string GetAnnotationEndString () const
 Gets the string representing the end of an annotation.
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNLanguageRepresentationFunction, BNNewLanguageRepresentationFunctionReference, BNFreeLanguageRepresentationFunction >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNLanguageRepresentationFunctionGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Protected Member Functions

virtual void InitTokenEmitter (HighLevelILTokenEmitter &tokens)
 Override this method to initialize the options for the token emitter before it is used.
 
virtual void GetExprText (const HighLevelILInstruction &instr, HighLevelILTokenEmitter &tokens, DisassemblySettings *settings, BNOperatorPrecedence precedence=TopLevelOperatorPrecedence, bool statement=false)=0
 This method must be overridden by all language representation plugins.
 
virtual void BeginLines (const HighLevelILInstruction &instr, HighLevelILTokenEmitter &tokens)
 This method can be overridden to emit tokens at the start of a function.
 
virtual void EndLines (const HighLevelILInstruction &instr, HighLevelILTokenEmitter &tokens)
 This method can be overridden to emit tokens at the end of a function.
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNLanguageRepresentationFunction, BNNewLanguageRepresentationFunctionReference, BNFreeLanguageRepresentationFunction >
static BNLanguageRepresentationFunctionGetObject (CoreRefCountObject *obj)
 
static BNLanguageRepresentationFunctionGetObject (const CoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNLanguageRepresentationFunction, BNNewLanguageRepresentationFunctionReference, BNFreeLanguageRepresentationFunction >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNLanguageRepresentationFunctionm_object
 

Constructor & Destructor Documentation

◆ LanguageRepresentationFunction() [1/2]

LanguageRepresentationFunction::LanguageRepresentationFunction ( Architecture * arch,
Function * func,
HighLevelILFunction * highLevelIL )

◆ LanguageRepresentationFunction() [2/2]

LanguageRepresentationFunction::LanguageRepresentationFunction ( BNLanguageRepresentationFunction * func)

Member Function Documentation

◆ GetExprText() [1/2]

vector< DisassemblyTextLine > LanguageRepresentationFunction::GetExprText ( const HighLevelILInstruction & instr,
DisassemblySettings * settings,
BNOperatorPrecedence precedence = TopLevelOperatorPrecedence,
bool statement = false )

Gets the lines of tokens for a given High Level IL instruction.

Parameters
instrThe instruction to emit lines for.
settingsThe settings for disassembly (optional).
precedenceThe current operator precedence level.
statementWhether the instruction is a statement or an expression.
Returns
A list of lines of tokens for the instruction.

◆ GetLinearLines()

vector< DisassemblyTextLine > LanguageRepresentationFunction::GetLinearLines ( const HighLevelILInstruction & instr,
DisassemblySettings * settings )

Generates lines for the given High Level IL instruction in the style of the linear view.

To get the lines for the entire function, pass the root instruction of a HighLevelILFunction.

Parameters
instrThe instruction to emit lines for.
settingsThe settings for disassembly (optional).
Returns
A list of lines of tokens for the instruction.

◆ GetBlockLines()

vector< DisassemblyTextLine > LanguageRepresentationFunction::GetBlockLines ( BasicBlock * block,
DisassemblySettings * settings )

Generates lines for a single High Level IL basic block.

Parameters
blockThe basic block to emit lines for.
settingsThe settings for disassembly (optional).
Returns
A list of lines of tokens for the basic block.

◆ GetHighlight()

BNHighlightColor LanguageRepresentationFunction::GetHighlight ( BasicBlock * block)

Gets the highlight color for a given basic block.

Parameters
blockThe basic block to get the highlight color for.
Returns
The highlight color for the basic block.

◆ GetArchitecture()

Ref< Architecture > LanguageRepresentationFunction::GetArchitecture ( ) const

◆ GetFunction()

Ref< Function > LanguageRepresentationFunction::GetFunction ( ) const

◆ GetHighLevelILFunction()

Ref< HighLevelILFunction > LanguageRepresentationFunction::GetHighLevelILFunction ( ) const

◆ GetCommentStartString()

virtual std::string BinaryNinja::LanguageRepresentationFunction::GetCommentStartString ( ) const
inlinevirtual

Gets the string representing the start of a comment.

Returns
The string representing the start of a comment.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunction.

◆ GetCommentEndString()

virtual std::string BinaryNinja::LanguageRepresentationFunction::GetCommentEndString ( ) const
inlinevirtual

Gets the string representing the end of a comment.

Returns
The string representing the end of a comment.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunction.

◆ GetAnnotationStartString()

virtual std::string BinaryNinja::LanguageRepresentationFunction::GetAnnotationStartString ( ) const
inlinevirtual

Gets the string representing the start of an annotation.

Returns
The string representing the start of an annotation.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunction.

◆ GetAnnotationEndString()

virtual std::string BinaryNinja::LanguageRepresentationFunction::GetAnnotationEndString ( ) const
inlinevirtual

Gets the string representing the end of an annotation.

Returns
The string representing the end of an annotation.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunction.

◆ InitTokenEmitter()

void LanguageRepresentationFunction::InitTokenEmitter ( HighLevelILTokenEmitter & tokens)
protectedvirtual

Override this method to initialize the options for the token emitter before it is used.

Parameters
tokensThe token emitter to initialize.

◆ GetExprText() [2/2]

virtual void BinaryNinja::LanguageRepresentationFunction::GetExprText ( const HighLevelILInstruction & instr,
HighLevelILTokenEmitter & tokens,
DisassemblySettings * settings,
BNOperatorPrecedence precedence = TopLevelOperatorPrecedence,
bool statement = false )
protectedpure virtual

This method must be overridden by all language representation plugins.

This method is called to emit the tokens for a given High Level IL instruction.

Parameters
instrThe instruction to emit tokens for.
tokensThe token emitter to use.
settingsThe disassembly settings to use (may be NULL).
precedenceThe current operator precedence level.
statementWhether the instruction is a statement or an expression.

Implemented in BinaryNinja::CoreLanguageRepresentationFunction.

◆ BeginLines()

void LanguageRepresentationFunction::BeginLines ( const HighLevelILInstruction & instr,
HighLevelILTokenEmitter & tokens )
protectedvirtual

This method can be overridden to emit tokens at the start of a function.

Parameters
instrThe root instruction of the function.
tokensThe token emitter to use.

◆ EndLines()

void LanguageRepresentationFunction::EndLines ( const HighLevelILInstruction & instr,
HighLevelILTokenEmitter & tokens )
protectedvirtual

This method can be overridden to emit tokens at the end of a function.

Parameters
instrThe root instruction of the function.
tokensThe token emitter to use.

◆ BinaryNinja::CoreLanguageRepresentationFunction

class BinaryNinja::CoreLanguageRepresentationFunction

Public Member Functions

 CoreLanguageRepresentationFunction (BNLanguageRepresentationFunction *func)
 
std::string GetCommentStartString () const override
 Gets the string representing the start of a comment.
 
std::string GetCommentEndString () const override
 Gets the string representing the end of a comment.
 
std::string GetAnnotationStartString () const override
 Gets the string representing the start of an annotation.
 
std::string GetAnnotationEndString () const override
 Gets the string representing the end of an annotation.
 
- Public Member Functions inherited from BinaryNinja::LanguageRepresentationFunction
 LanguageRepresentationFunction (Architecture *arch, Function *func, HighLevelILFunction *highLevelIL)
 
 LanguageRepresentationFunction (BNLanguageRepresentationFunction *func)
 
std::vector< DisassemblyTextLineGetExprText (const HighLevelILInstruction &instr, DisassemblySettings *settings, BNOperatorPrecedence precedence=TopLevelOperatorPrecedence, bool statement=false)
 Gets the lines of tokens for a given High Level IL instruction.
 
std::vector< DisassemblyTextLineGetLinearLines (const HighLevelILInstruction &instr, DisassemblySettings *settings)
 Generates lines for the given High Level IL instruction in the style of the linear view.
 
std::vector< DisassemblyTextLineGetBlockLines (BasicBlock *block, DisassemblySettings *settings)
 Generates lines for a single High Level IL basic block.
 
BNHighlightColor GetHighlight (BasicBlock *block)
 Gets the highlight color for a given basic block.
 
Ref< ArchitectureGetArchitecture () const
 
Ref< FunctionGetFunction () const
 
Ref< HighLevelILFunctionGetHighLevelILFunction () const
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNLanguageRepresentationFunction, BNNewLanguageRepresentationFunctionReference, BNFreeLanguageRepresentationFunction >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNLanguageRepresentationFunctionGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Protected Member Functions

void GetExprText (const HighLevelILInstruction &instr, HighLevelILTokenEmitter &tokens, DisassemblySettings *settings, BNOperatorPrecedence precedence=TopLevelOperatorPrecedence, bool statement=false) override
 This method must be overridden by all language representation plugins.
 
- Protected Member Functions inherited from BinaryNinja::LanguageRepresentationFunction
virtual void InitTokenEmitter (HighLevelILTokenEmitter &tokens)
 Override this method to initialize the options for the token emitter before it is used.
 
virtual void BeginLines (const HighLevelILInstruction &instr, HighLevelILTokenEmitter &tokens)
 This method can be overridden to emit tokens at the start of a function.
 
virtual void EndLines (const HighLevelILInstruction &instr, HighLevelILTokenEmitter &tokens)
 This method can be overridden to emit tokens at the end of a function.
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNLanguageRepresentationFunction, BNNewLanguageRepresentationFunctionReference, BNFreeLanguageRepresentationFunction >
static BNLanguageRepresentationFunctionGetObject (CoreRefCountObject *obj)
 
static BNLanguageRepresentationFunctionGetObject (const CoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNLanguageRepresentationFunction, BNNewLanguageRepresentationFunctionReference, BNFreeLanguageRepresentationFunction >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNLanguageRepresentationFunctionm_object
 

Constructor & Destructor Documentation

◆ CoreLanguageRepresentationFunction()

CoreLanguageRepresentationFunction::CoreLanguageRepresentationFunction ( BNLanguageRepresentationFunction * func)

Member Function Documentation

◆ GetCommentStartString()

string CoreLanguageRepresentationFunction::GetCommentStartString ( ) const
overridevirtual

Gets the string representing the start of a comment.

Returns
The string representing the start of a comment.

Reimplemented from BinaryNinja::LanguageRepresentationFunction.

◆ GetCommentEndString()

string CoreLanguageRepresentationFunction::GetCommentEndString ( ) const
overridevirtual

Gets the string representing the end of a comment.

Returns
The string representing the end of a comment.

Reimplemented from BinaryNinja::LanguageRepresentationFunction.

◆ GetAnnotationStartString()

string CoreLanguageRepresentationFunction::GetAnnotationStartString ( ) const
overridevirtual

Gets the string representing the start of an annotation.

Returns
The string representing the start of an annotation.

Reimplemented from BinaryNinja::LanguageRepresentationFunction.

◆ GetAnnotationEndString()

string CoreLanguageRepresentationFunction::GetAnnotationEndString ( ) const
overridevirtual

Gets the string representing the end of an annotation.

Returns
The string representing the end of an annotation.

Reimplemented from BinaryNinja::LanguageRepresentationFunction.

◆ GetExprText()

void CoreLanguageRepresentationFunction::GetExprText ( const HighLevelILInstruction & instr,
HighLevelILTokenEmitter & tokens,
DisassemblySettings * settings,
BNOperatorPrecedence precedence = TopLevelOperatorPrecedence,
bool statement = false )
overrideprotectedvirtual

This method must be overridden by all language representation plugins.

This method is called to emit the tokens for a given High Level IL instruction.

Parameters
instrThe instruction to emit tokens for.
tokensThe token emitter to use.
settingsThe disassembly settings to use (may be NULL).
precedenceThe current operator precedence level.
statementWhether the instruction is a statement or an expression.

Implements BinaryNinja::LanguageRepresentationFunction.

◆ BinaryNinja::LanguageRepresentationFunctionType

class BinaryNinja::LanguageRepresentationFunctionType

LanguageRepresentationFunctionType represents a custom language representation function type.

This class provides methods to create LanguageRepresentationFunction instances for functions, as well as manage the printing and parsing of types.

Public Member Functions

 LanguageRepresentationFunctionType (const std::string &name)
 
 LanguageRepresentationFunctionType (BNLanguageRepresentationFunctionType *type)
 
std::string GetName () const
 
virtual Ref< LanguageRepresentationFunctionCreate (Architecture *arch, Function *owner, HighLevelILFunction *highLevelIL)=0
 This method must be overridden.
 
virtual bool IsValid (BinaryView *view)
 Returns whether the language is valid for the given binary view.
 
virtual Ref< TypePrinterGetTypePrinter ()
 Returns the type printer for displaying types in this language.
 
virtual Ref< TypeParserGetTypeParser ()
 Returns the type parser for parsing types in this language.
 
virtual std::vector< DisassemblyTextLineGetFunctionTypeTokens (Function *func, DisassemblySettings *settings=nullptr)
 Returns a list of lines representing a function prototype in this language.
 
- Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNLanguageRepresentationFunctionType >
 StaticCoreRefCountObject ()
 
virtual ~StaticCoreRefCountObject ()
 
BNLanguageRepresentationFunctionTypeGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static void Register (LanguageRepresentationFunctionType *type)
 Registers the language representation function type.
 
static Ref< LanguageRepresentationFunctionTypeGetByName (const std::string &name)
 
static bool IsValidByName (const std::string &name, BinaryView *view)
 
static std::vector< Ref< LanguageRepresentationFunctionType > > GetTypes ()
 
- Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNLanguageRepresentationFunctionType >
static BNLanguageRepresentationFunctionTypeGetObject (StaticCoreRefCountObject *obj)
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNLanguageRepresentationFunctionType >
std::atomic< int > m_refs
 
BNLanguageRepresentationFunctionTypem_object
 

Constructor & Destructor Documentation

◆ LanguageRepresentationFunctionType() [1/2]

LanguageRepresentationFunctionType::LanguageRepresentationFunctionType ( const std::string & name)

◆ LanguageRepresentationFunctionType() [2/2]

LanguageRepresentationFunctionType::LanguageRepresentationFunctionType ( BNLanguageRepresentationFunctionType * type)

Member Function Documentation

◆ GetName()

string LanguageRepresentationFunctionType::GetName ( ) const

◆ Create()

virtual Ref< LanguageRepresentationFunction > BinaryNinja::LanguageRepresentationFunctionType::Create ( Architecture * arch,
Function * owner,
HighLevelILFunction * highLevelIL )
pure virtual

This method must be overridden.

This creates the LanguageRepresentationFunction object for the given architecture, owner function, and High Level IL function.

Parameters
archThe architecture of the function.
ownerThe associated function.
highLevelILThe High Level IL for the function.
Returns
A LanguageRepresentationFunction instance for the given function.

Implemented in BinaryNinja::CoreLanguageRepresentationFunctionType.

◆ IsValid()

bool LanguageRepresentationFunctionType::IsValid ( BinaryView * view)
virtual

Returns whether the language is valid for the given binary view.

Parameters
viewThe binary view to check the validity for.
Returns
True if the language is valid for the given binary view, false otherwise.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunctionType.

◆ GetTypePrinter()

virtual Ref< TypePrinter > BinaryNinja::LanguageRepresentationFunctionType::GetTypePrinter ( )
inlinevirtual

Returns the type printer for displaying types in this language.

If NULL is returned, the default type printer will be used.

Returns
The optional type printer for displaying types in this language.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunctionType.

◆ GetTypeParser()

virtual Ref< TypeParser > BinaryNinja::LanguageRepresentationFunctionType::GetTypeParser ( )
inlinevirtual

Returns the type parser for parsing types in this language.

If NULL is returned, the default type parser will be used.

Returns
The optional type parser for parsing types in this language.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunctionType.

◆ GetFunctionTypeTokens()

vector< DisassemblyTextLine > LanguageRepresentationFunctionType::GetFunctionTypeTokens ( Function * func,
DisassemblySettings * settings = nullptr )
virtual

Returns a list of lines representing a function prototype in this language.

If no lines are returned, the default C-style prototype will be used.

Parameters
funcThe function to get the prototype lines for.
settingsThe disassembly settings to use (may be NULL).
Returns
An optional vector of lines representing the function prototype.

Reimplemented in BinaryNinja::CoreLanguageRepresentationFunctionType.

◆ Register()

void LanguageRepresentationFunctionType::Register ( LanguageRepresentationFunctionType * type)
static

Registers the language representation function type.

Parameters
typeThe language representation function type to register.

◆ GetByName()

Ref< LanguageRepresentationFunctionType > LanguageRepresentationFunctionType::GetByName ( const std::string & name)
static

◆ IsValidByName()

bool LanguageRepresentationFunctionType::IsValidByName ( const std::string & name,
BinaryView * view )
static

◆ GetTypes()

vector< Ref< LanguageRepresentationFunctionType > > LanguageRepresentationFunctionType::GetTypes ( )
static

◆ BinaryNinja::HighLevelILTokenEmitter

class BinaryNinja::HighLevelILTokenEmitter

HighLevelILTokenEmitter contains methods for emitting text tokens for High Level IL instructions.

Methods are provided for typical patterns found in various high level languages.

This class cannot be instantiated directly. An instance of the class will be provided when the methods in LanguageRepresentationFunction are called.

Public Member Functions

 HighLevelILTokenEmitter (BNHighLevelILTokenEmitter *emitter)
 
template<typename... Args>
void Append (Args &&... args)
 Appends a token to the output.
 
void PrependCollapseIndicator ()
 
void PrependCollapseIndicator (Ref< Function > function, const HighLevelILInstruction &instr, uint64_t designator=0)
 
void PrependCollapseIndicator (BNInstructionTextTokenContext context, uint64_t hash)
 
bool HasCollapsableRegions ()
 
void SetHasCollapsableRegions (bool state)
 
void InitLine ()
 Starts a new line in the output.
 
void NewLine ()
 Starts a new line in the output.
 
void IncreaseIndent ()
 Increases the indentation level by one.
 
void DecreaseIndent ()
 Decreases the indentation level by one.
 
void ScopeSeparator ()
 Indicates that visual separation of scopes is desirable at the current position.
 
void BeginScope (BNScopeType scopeType)
 Begins a new scope.
 
void EndScope (BNScopeType scopeType)
 Ends the current scope.
 
void ScopeContinuation (bool forceSameLine)
 Continues the previous scope with a new associated scope.
 
void FinalizeScope ()
 Finalizes the previous scope, indicating that there are no more associated scopes.
 
void NoIndentForThisLine ()
 Forces there to be no indentation for the next line.
 
void BeginForceZeroConfidence ()
 Begins a region of tokens that always have zero confidence.
 
void EndForceZeroConfidence ()
 Ends a region of tokens that always have zero confidence.
 
CurrentExprGuard SetCurrentExpr (const HighLevelILInstruction &expr)
 Sets the current expression.
 
void Finalize ()
 Finalizes the outputted lines.
 
void AppendOpenParen ()
 
void AppendCloseParen ()
 
void AppendOpenBracket ()
 
void AppendCloseBracket ()
 
void AppendOpenBrace ()
 
void AppendCloseBrace ()
 
void AppendSemicolon ()
 
std::vector< InstructionTextTokenGetCurrentTokens () const
 Returns the list of tokens on the current line.
 
void SetBraceRequirement (BNBraceRequirement required)
 Sets the requirement for insertion of braces around scopes in the output.
 
void SetBracesAroundSwitchCases (bool braces)
 Sets whether cases within switch statements should always have braces around them.
 
void SetDefaultBracesOnSameLine (bool sameLine)
 Sets whether braces should default to being on the same line as the statement that begins the scope.
 
void SetSimpleScopeAllowed (bool allowed)
 Sets whether omitting braces around single-line scopes is allowed.
 
BNBraceRequirement GetBraceRequirement () const
 
bool HasBracesAroundSwitchCases () const
 
bool GetDefaultBracesOnSameLine () const
 
bool IsSimpleScopeAllowed () const
 
std::vector< DisassemblyTextLineGetLines () const
 Gets the list of lines in the output.
 
void AppendSizeToken (size_t size, BNInstructionTextTokenType type)
 Appends a size token for the given size in the High Level IL syntax.
 
void AppendFloatSizeToken (size_t size, BNInstructionTextTokenType type)
 Appends a floating point size token for the given size in the High Level IL syntax.
 
void AppendVarTextToken (const Variable &var, const HighLevelILInstruction &instr, size_t size)
 Appends tokens for access to a variable.
 
void AppendIntegerTextToken (const HighLevelILInstruction &instr, int64_t val, size_t size)
 Appends tokens for a constant intenger value.
 
void AppendArrayIndexToken (const HighLevelILInstruction &instr, int64_t val, size_t size, uint64_t address=0)
 Appends tokens for accessing an array by constant index.
 
BNSymbolDisplayResult AppendPointerTextToken (const HighLevelILInstruction &instr, int64_t val, DisassemblySettings *settings, BNSymbolDisplayType symbolDisplay, BNOperatorPrecedence precedence, bool allowShortString=false)
 Appends tokens for displaying a constant pointer value.
 
void AppendConstantTextToken (const HighLevelILInstruction &instr, int64_t val, size_t size, DisassemblySettings *settings, BNOperatorPrecedence precedence)
 Appends tokens for a constant value.
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNHighLevelILTokenEmitter, BNNewHighLevelILTokenEmitterReference, BNFreeHighLevelILTokenEmitter >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNHighLevelILTokenEmitterGetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 
void AddRefForCallback ()
 
void ReleaseForCallback ()
 

Static Public Member Functions

static void AddNamesForOuterStructureMembers (BinaryView *data, Type *type, const HighLevelILInstruction &var, std::vector< std::string > &nameList)
 Prepends the list of names for the outer structure members when accessing a structure member.
 
- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNHighLevelILTokenEmitter, BNNewHighLevelILTokenEmitterReference, BNFreeHighLevelILTokenEmitter >
static BNHighLevelILTokenEmitterGetObject (CoreRefCountObject *obj)
 
static BNHighLevelILTokenEmitterGetObject (const CoreRefCountObject *obj)
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNHighLevelILTokenEmitter, BNNewHighLevelILTokenEmitterReference, BNFreeHighLevelILTokenEmitter >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNHighLevelILTokenEmitterm_object
 

Constructor & Destructor Documentation

◆ HighLevelILTokenEmitter()

HighLevelILTokenEmitter::HighLevelILTokenEmitter ( BNHighLevelILTokenEmitter * emitter)

Member Function Documentation

◆ Append()

template<typename... Args>
void BinaryNinja::HighLevelILTokenEmitter::Append ( Args &&... args)
inline

Appends a token to the output.

◆ PrependCollapseIndicator() [1/3]

void HighLevelILTokenEmitter::PrependCollapseIndicator ( )

◆ PrependCollapseIndicator() [2/3]

void HighLevelILTokenEmitter::PrependCollapseIndicator ( Ref< Function > function,
const HighLevelILInstruction & instr,
uint64_t designator = 0 )

◆ PrependCollapseIndicator() [3/3]

void HighLevelILTokenEmitter::PrependCollapseIndicator ( BNInstructionTextTokenContext context,
uint64_t hash )

◆ HasCollapsableRegions()

bool HighLevelILTokenEmitter::HasCollapsableRegions ( )

◆ SetHasCollapsableRegions()

void HighLevelILTokenEmitter::SetHasCollapsableRegions ( bool state)

◆ InitLine()

void HighLevelILTokenEmitter::InitLine ( )

Starts a new line in the output.

◆ NewLine()

void HighLevelILTokenEmitter::NewLine ( )

Starts a new line in the output.

◆ IncreaseIndent()

void HighLevelILTokenEmitter::IncreaseIndent ( )

Increases the indentation level by one.

◆ DecreaseIndent()

void HighLevelILTokenEmitter::DecreaseIndent ( )

Decreases the indentation level by one.

◆ ScopeSeparator()

void HighLevelILTokenEmitter::ScopeSeparator ( )

Indicates that visual separation of scopes is desirable at the current position.

By default, this will insert a blank line, but this can be configured by the user.

◆ BeginScope()

void HighLevelILTokenEmitter::BeginScope ( BNScopeType scopeType)

Begins a new scope.

Insertion of newlines and braces will be handled using the current settings.

Parameters
scopeTypeType of scope to be started.

◆ EndScope()

void HighLevelILTokenEmitter::EndScope ( BNScopeType scopeType)

Ends the current scope.

Parameters
scopeTypeType of scope passed to BeginScope.

◆ ScopeContinuation()

void HighLevelILTokenEmitter::ScopeContinuation ( bool forceSameLine)

Continues the previous scope with a new associated scope.

This is most commonly used for else statements.

Parameters
forceSameLineIf true, the continuation will always be placed on the same line as the previous scope.

◆ FinalizeScope()

void HighLevelILTokenEmitter::FinalizeScope ( )

Finalizes the previous scope, indicating that there are no more associated scopes.

◆ NoIndentForThisLine()

void HighLevelILTokenEmitter::NoIndentForThisLine ( )

Forces there to be no indentation for the next line.

◆ BeginForceZeroConfidence()

void HighLevelILTokenEmitter::BeginForceZeroConfidence ( )

Begins a region of tokens that always have zero confidence.

◆ EndForceZeroConfidence()

void HighLevelILTokenEmitter::EndForceZeroConfidence ( )

Ends a region of tokens that always have zero confidence.

◆ SetCurrentExpr()

HighLevelILTokenEmitter::CurrentExprGuard HighLevelILTokenEmitter::SetCurrentExpr ( const HighLevelILInstruction & expr)

Sets the current expression.

When the returned guard object goes out of scope, the previously set expression becomes active again.

Parameters
exprExpression to set as the current expression.
Returns
Guard object to manage the current expression.

◆ Finalize()

void HighLevelILTokenEmitter::Finalize ( )

Finalizes the outputted lines.

◆ AppendOpenParen()

void HighLevelILTokenEmitter::AppendOpenParen ( )

◆ AppendCloseParen()

void HighLevelILTokenEmitter::AppendCloseParen ( )

◆ AppendOpenBracket()

void HighLevelILTokenEmitter::AppendOpenBracket ( )

◆ AppendCloseBracket()

void HighLevelILTokenEmitter::AppendCloseBracket ( )

◆ AppendOpenBrace()

void HighLevelILTokenEmitter::AppendOpenBrace ( )

◆ AppendCloseBrace()

void HighLevelILTokenEmitter::AppendCloseBrace ( )

◆ AppendSemicolon()

void HighLevelILTokenEmitter::AppendSemicolon ( )

◆ GetCurrentTokens()

vector< InstructionTextToken > HighLevelILTokenEmitter::GetCurrentTokens ( ) const

Returns the list of tokens on the current line.

◆ SetBraceRequirement()

void HighLevelILTokenEmitter::SetBraceRequirement ( BNBraceRequirement required)

Sets the requirement for insertion of braces around scopes in the output.

◆ SetBracesAroundSwitchCases()

void HighLevelILTokenEmitter::SetBracesAroundSwitchCases ( bool braces)

Sets whether cases within switch statements should always have braces around them.

◆ SetDefaultBracesOnSameLine()

void HighLevelILTokenEmitter::SetDefaultBracesOnSameLine ( bool sameLine)

Sets whether braces should default to being on the same line as the statement that begins the scope.

If the user has explicitly set a preference, this setting will be ignored and the user's preference will be used instead.

◆ SetSimpleScopeAllowed()

void HighLevelILTokenEmitter::SetSimpleScopeAllowed ( bool allowed)

Sets whether omitting braces around single-line scopes is allowed.

◆ GetBraceRequirement()

BNBraceRequirement HighLevelILTokenEmitter::GetBraceRequirement ( ) const

◆ HasBracesAroundSwitchCases()

bool HighLevelILTokenEmitter::HasBracesAroundSwitchCases ( ) const

◆ GetDefaultBracesOnSameLine()

bool HighLevelILTokenEmitter::GetDefaultBracesOnSameLine ( ) const

◆ IsSimpleScopeAllowed()

bool HighLevelILTokenEmitter::IsSimpleScopeAllowed ( ) const

◆ GetLines()

vector< DisassemblyTextLine > HighLevelILTokenEmitter::GetLines ( ) const

Gets the list of lines in the output.

◆ AppendSizeToken()

void HighLevelILTokenEmitter::AppendSizeToken ( size_t size,
BNInstructionTextTokenType type )

Appends a size token for the given size in the High Level IL syntax.

Parameters
sizeSize in bytes.
typeToken type to append.

◆ AppendFloatSizeToken()

void HighLevelILTokenEmitter::AppendFloatSizeToken ( size_t size,
BNInstructionTextTokenType type )

Appends a floating point size token for the given size in the High Level IL syntax.

Parameters
sizeSize in bytes.
typeToken type to append.

◆ AppendVarTextToken()

void HighLevelILTokenEmitter::AppendVarTextToken ( const Variable & var,
const HighLevelILInstruction & instr,
size_t size )

Appends tokens for access to a variable.

Parameters
varVariable to access.
instrInstruction that accesses the variable.
sizeSize in bytes.

◆ AppendIntegerTextToken()

void HighLevelILTokenEmitter::AppendIntegerTextToken ( const HighLevelILInstruction & instr,
int64_t val,
size_t size )

Appends tokens for a constant intenger value.

Parameters
instrInstruction that references the value.
valInteger value.
sizeSize in bytes.

◆ AppendArrayIndexToken()

void HighLevelILTokenEmitter::AppendArrayIndexToken ( const HighLevelILInstruction & instr,
int64_t val,
size_t size,
uint64_t address = 0 )

Appends tokens for accessing an array by constant index.

Parameters
instrInstruction that accesses the array.
valIndex value.
sizeSize in bytes.
addressOptional address override.

◆ AppendPointerTextToken()

BNSymbolDisplayResult HighLevelILTokenEmitter::AppendPointerTextToken ( const HighLevelILInstruction & instr,
int64_t val,
DisassemblySettings * settings,
BNSymbolDisplayType symbolDisplay,
BNOperatorPrecedence precedence,
bool allowShortString = false )

Appends tokens for displaying a constant pointer value.

Parameters
instrInstruction that references the pointer.
valPointer value.
settingsSettings for disassembly (may be NULL).
symbolDisplaySymbol display type.
precedenceCurrent operator precedence level.
allowShortStringIf true, show as a string even if it is short.
Returns
Type of symbol resolved if any.

◆ AppendConstantTextToken()

void HighLevelILTokenEmitter::AppendConstantTextToken ( const HighLevelILInstruction & instr,
int64_t val,
size_t size,
DisassemblySettings * settings,
BNOperatorPrecedence precedence )

Appends tokens for a constant value.

Parameters
instrInstruction that references the value.
valConstant value.
sizeSize in bytes.
settingsSettings for disassembly (may be NULL).
precedenceCurrent operator precedence level.

◆ AddNamesForOuterStructureMembers()

void HighLevelILTokenEmitter::AddNamesForOuterStructureMembers ( BinaryView * data,
Type * type,
const HighLevelILInstruction & var,
std::vector< std::string > & nameList )
static

Prepends the list of names for the outer structure members when accessing a structure member.

This list can be passed as the list of type names in tokens.

Parameters
dataBinary view associated with the type.
typeStructure Type being accessed.
varStructure variable.
nameListExisting list of member names. This list will be updated with the outer structure member names.

◆ BinaryNinja::HighLevelILTokenEmitter::CurrentExprGuard

class BinaryNinja::HighLevelILTokenEmitter::CurrentExprGuard

Public Member Functions

 CurrentExprGuard (HighLevelILTokenEmitter &parent, const BNTokenEmitterExpr &expr)
 
 ~CurrentExprGuard ()
 

Constructor & Destructor Documentation

◆ CurrentExprGuard()

HighLevelILTokenEmitter::CurrentExprGuard::CurrentExprGuard ( HighLevelILTokenEmitter & parent,
const BNTokenEmitterExpr & expr )

◆ ~CurrentExprGuard()

HighLevelILTokenEmitter::CurrentExprGuard::~CurrentExprGuard ( )

◆ BinaryNinja::HighLevelILInstructionAccessException

class BinaryNinja::HighLevelILInstructionAccessException

Public Member Functions

 HighLevelILInstructionAccessException ()
 
- Public Member Functions inherited from BinaryNinja::ExceptionWithStackTrace
 ExceptionWithStackTrace (const std::string &message)
 
 ExceptionWithStackTrace (std::exception_ptr exc1, std::exception_ptr exc2)
 
const char * what () const noexcept override
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::ExceptionWithStackTrace
std::string m_originalMessage
 
std::string m_message
 
std::string m_stackTrace
 

Constructor & Destructor Documentation

◆ HighLevelILInstructionAccessException()

BinaryNinja::HighLevelILInstructionAccessException::HighLevelILInstructionAccessException ( )
inline

◆ BinaryNinja::HighLevelILIntegerList

class BinaryNinja::HighLevelILIntegerList

Public Types

typedef ListIterator const_iterator
 

Public Member Functions

 HighLevelILIntegerList (HighLevelILFunction *func, const BNHighLevelILInstruction &instr, size_t count)
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
uint64_t operator[] (size_t i) const
 
 operator std::vector< uint64_t > () const
 

Member Typedef Documentation

◆ const_iterator

Constructor & Destructor Documentation

◆ HighLevelILIntegerList()

HighLevelILIntegerList::HighLevelILIntegerList ( HighLevelILFunction * func,
const BNHighLevelILInstruction & instr,
size_t count )

Member Function Documentation

◆ begin()

HighLevelILIntegerList::const_iterator HighLevelILIntegerList::begin ( ) const

◆ end()

HighLevelILIntegerList::const_iterator HighLevelILIntegerList::end ( ) const

◆ size()

size_t HighLevelILIntegerList::size ( ) const

◆ operator[]()

uint64_t HighLevelILIntegerList::operator[] ( size_t i) const

◆ operator std::vector< uint64_t >()

BinaryNinja::HighLevelILIntegerList::operator std::vector< uint64_t > ( ) const

◆ BinaryNinja::HighLevelILIndexList

class BinaryNinja::HighLevelILIndexList

Public Types

typedef ListIterator const_iterator
 

Public Member Functions

 HighLevelILIndexList (HighLevelILFunction *func, const BNHighLevelILInstruction &instr, size_t count)
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
size_t operator[] (size_t i) const
 
 operator std::vector< size_t > () const
 

Member Typedef Documentation

◆ const_iterator

Constructor & Destructor Documentation

◆ HighLevelILIndexList()

HighLevelILIndexList::HighLevelILIndexList ( HighLevelILFunction * func,
const BNHighLevelILInstruction & instr,
size_t count )

Member Function Documentation

◆ begin()

HighLevelILIndexList::const_iterator HighLevelILIndexList::begin ( ) const

◆ end()

HighLevelILIndexList::const_iterator HighLevelILIndexList::end ( ) const

◆ size()

size_t HighLevelILIndexList::size ( ) const

◆ operator[]()

size_t HighLevelILIndexList::operator[] ( size_t i) const

◆ operator std::vector< size_t >()

BinaryNinja::HighLevelILIndexList::operator std::vector< size_t > ( ) const

◆ BinaryNinja::HighLevelILInstructionList

class BinaryNinja::HighLevelILInstructionList

Public Types

typedef ListIterator const_iterator
 

Public Member Functions

 HighLevelILInstructionList (HighLevelILFunction *func, const BNHighLevelILInstruction &instr, size_t count, bool asFullAst, size_t instructionIndex)
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
const HighLevelILInstruction operator[] (size_t i) const
 
 operator std::vector< HighLevelILInstruction > () const
 

Member Typedef Documentation

◆ const_iterator

Constructor & Destructor Documentation

◆ HighLevelILInstructionList()

HighLevelILInstructionList::HighLevelILInstructionList ( HighLevelILFunction * func,
const BNHighLevelILInstruction & instr,
size_t count,
bool asFullAst,
size_t instructionIndex )

Member Function Documentation

◆ begin()

HighLevelILInstructionList::const_iterator HighLevelILInstructionList::begin ( ) const

◆ end()

HighLevelILInstructionList::const_iterator HighLevelILInstructionList::end ( ) const

◆ size()

size_t HighLevelILInstructionList::size ( ) const

◆ operator[]()

const HighLevelILInstruction HighLevelILInstructionList::operator[] ( size_t i) const

◆ operator std::vector< HighLevelILInstruction >()

BinaryNinja::HighLevelILInstructionList::operator std::vector< HighLevelILInstruction > ( ) const

◆ BinaryNinja::HighLevelILSSAVariableList

class BinaryNinja::HighLevelILSSAVariableList

Public Types

typedef ListIterator const_iterator
 

Public Member Functions

 HighLevelILSSAVariableList (HighLevelILFunction *func, const BNHighLevelILInstruction &instr, size_t count)
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
const SSAVariable operator[] (size_t i) const
 
 operator std::vector< SSAVariable > () const
 

Member Typedef Documentation

◆ const_iterator

Constructor & Destructor Documentation

◆ HighLevelILSSAVariableList()

HighLevelILSSAVariableList::HighLevelILSSAVariableList ( HighLevelILFunction * func,
const BNHighLevelILInstruction & instr,
size_t count )

Member Function Documentation

◆ begin()

HighLevelILSSAVariableList::const_iterator HighLevelILSSAVariableList::begin ( ) const

◆ end()

HighLevelILSSAVariableList::const_iterator HighLevelILSSAVariableList::end ( ) const

◆ size()

size_t HighLevelILSSAVariableList::size ( ) const

◆ operator[]()

const SSAVariable HighLevelILSSAVariableList::operator[] ( size_t i) const

◆ operator std::vector< SSAVariable >()

BinaryNinja::HighLevelILSSAVariableList::operator std::vector< SSAVariable > ( ) const

◆ BinaryNinja::HighLevelILInstructionBase

struct BinaryNinja::HighLevelILInstructionBase

Public Member Functions

HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Public Attributes

Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 

Static Public Attributes

static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Member Function Documentation

◆ GetOperands()

HighLevelILOperandList HighLevelILInstructionBase::GetOperands ( ) const

◆ GetRawOperandAsInteger()

uint64_t HighLevelILInstructionBase::GetRawOperandAsInteger ( size_t operand) const

◆ GetRawOperandAsConstantData()

ConstantData HighLevelILInstructionBase::GetRawOperandAsConstantData ( size_t operand) const

◆ GetRawOperandAsIndex()

size_t HighLevelILInstructionBase::GetRawOperandAsIndex ( size_t operand) const

◆ GetRawOperandAsExpr()

HighLevelILInstruction HighLevelILInstructionBase::GetRawOperandAsExpr ( size_t operand) const

◆ GetRawOperandAsVariable()

Variable HighLevelILInstructionBase::GetRawOperandAsVariable ( size_t operand) const

◆ GetRawOperandAsSSAVariable()

SSAVariable HighLevelILInstructionBase::GetRawOperandAsSSAVariable ( size_t operand) const

◆ GetRawOperandAsExprList()

HighLevelILInstructionList HighLevelILInstructionBase::GetRawOperandAsExprList ( size_t operand) const

◆ GetRawOperandAsSSAVariableList()

HighLevelILSSAVariableList HighLevelILInstructionBase::GetRawOperandAsSSAVariableList ( size_t operand) const

◆ GetRawOperandAsIndexList()

HighLevelILIndexList HighLevelILInstructionBase::GetRawOperandAsIndexList ( size_t operand) const

◆ UpdateRawOperand()

void HighLevelILInstructionBase::UpdateRawOperand ( size_t operandIndex,
ExprId value )

◆ UpdateRawOperandAsInteger()

void HighLevelILInstructionBase::UpdateRawOperandAsInteger ( size_t operandIndex,
uint64_t value )

◆ UpdateRawOperandAsSSAVariableList()

void HighLevelILInstructionBase::UpdateRawOperandAsSSAVariableList ( size_t operandIndex,
const std::vector< SSAVariable > & vars )

◆ UpdateRawOperandAsExprList() [1/2]

void BinaryNinja::HighLevelILInstructionBase::UpdateRawOperandAsExprList ( size_t operandIndex,
const std::vector< HighLevelILInstruction > & exprs )

◆ UpdateRawOperandAsExprList() [2/2]

void BinaryNinja::HighLevelILInstructionBase::UpdateRawOperandAsExprList ( size_t operandIndex,
const std::vector< size_t > & exprs )

◆ GetValue()

RegisterValue HighLevelILInstructionBase::GetValue ( ) const

◆ GetPossibleValues()

PossibleValueSet HighLevelILInstructionBase::GetPossibleValues ( const std::set< BNDataFlowQueryOption > & options = std::set <BNDataFlowQueryOption>()) const

◆ GetType()

Confidence< Ref< Type > > HighLevelILInstructionBase::GetType ( ) const

◆ GetSSAExprIndex()

size_t HighLevelILInstructionBase::GetSSAExprIndex ( ) const

◆ GetNonSSAExprIndex()

size_t HighLevelILInstructionBase::GetNonSSAExprIndex ( ) const

◆ GetSSAForm()

HighLevelILInstruction HighLevelILInstructionBase::GetSSAForm ( ) const

◆ GetNonSSAForm()

HighLevelILInstruction HighLevelILInstructionBase::GetNonSSAForm ( ) const

◆ GetMediumLevelILExprIndex()

size_t HighLevelILInstructionBase::GetMediumLevelILExprIndex ( ) const

◆ HasMediumLevelIL()

bool HighLevelILInstructionBase::HasMediumLevelIL ( ) const

◆ GetMediumLevelIL()

MediumLevelILInstruction HighLevelILInstructionBase::GetMediumLevelIL ( ) const

◆ GetMediumLevelILSSAForm()

MediumLevelILInstruction HighLevelILInstructionBase::GetMediumLevelILSSAForm ( ) const

◆ Dump()

char * HighLevelILInstructionBase::Dump ( ) const

◆ Replace()

void HighLevelILInstructionBase::Replace ( ExprId expr)

◆ SetAttributes()

void HighLevelILInstructionBase::SetAttributes ( uint32_t attributes)

◆ SetAttribute()

void HighLevelILInstructionBase::SetAttribute ( BNILInstructionAttribute attribute,
bool state = true )

◆ ClearAttribute()

void HighLevelILInstructionBase::ClearAttribute ( BNILInstructionAttribute attribute)

◆ GetInstructionIndex()

size_t HighLevelILInstructionBase::GetInstructionIndex ( ) const

◆ GetInstruction()

HighLevelILInstruction HighLevelILInstructionBase::GetInstruction ( ) const

◆ AsAST()

HighLevelILInstruction HighLevelILInstructionBase::AsAST ( ) const

◆ AsNonAST()

HighLevelILInstruction HighLevelILInstructionBase::AsNonAST ( ) const

◆ HasParent()

bool HighLevelILInstructionBase::HasParent ( ) const

◆ GetParent()

HighLevelILInstruction HighLevelILInstructionBase::GetParent ( ) const

◆ GetInstructionHash()

uint64_t BinaryNinja::HighLevelILInstructionBase::GetInstructionHash ( size_t discriminator = 0) const
inline

◆ As() [1/2]

HighLevelILInstructionAccessor< N > & BinaryNinja::HighLevelILInstructionBase::As ( )
inline

◆ AsOneOperand() [1/2]

HighLevelILOneOperandInstruction & BinaryNinja::HighLevelILInstructionBase::AsOneOperand ( )
inline

◆ AsTwoOperand() [1/2]

HighLevelILTwoOperandInstruction & BinaryNinja::HighLevelILInstructionBase::AsTwoOperand ( )
inline

◆ AsTwoOperandWithCarry() [1/2]

HighLevelILTwoOperandWithCarryInstruction & BinaryNinja::HighLevelILInstructionBase::AsTwoOperandWithCarry ( )
inline

◆ As() [2/2]

const HighLevelILInstructionAccessor< N > & BinaryNinja::HighLevelILInstructionBase::As ( ) const
inline

◆ AsConstant()

const HighLevelILConstantInstruction & BinaryNinja::HighLevelILInstructionBase::AsConstant ( ) const
inline

◆ AsConstantData()

const HighLevelILConstantDataInstruction & BinaryNinja::HighLevelILInstructionBase::AsConstantData ( ) const
inline

◆ AsOneOperand() [2/2]

const HighLevelILOneOperandInstruction & BinaryNinja::HighLevelILInstructionBase::AsOneOperand ( ) const
inline

◆ AsTwoOperand() [2/2]

const HighLevelILTwoOperandInstruction & BinaryNinja::HighLevelILInstructionBase::AsTwoOperand ( ) const
inline

◆ AsTwoOperandWithCarry() [2/2]

const HighLevelILTwoOperandWithCarryInstruction & BinaryNinja::HighLevelILInstructionBase::AsTwoOperandWithCarry ( ) const
inline

Member Data Documentation

◆ function

Ref<HighLevelILFunction> BinaryNinja::HighLevelILInstructionBase::function = nullptr

◆ exprIndex

size_t BinaryNinja::HighLevelILInstructionBase::exprIndex

◆ instructionIndex

size_t BinaryNinja::HighLevelILInstructionBase::instructionIndex

◆ ast

bool BinaryNinja::HighLevelILInstructionBase::ast

◆ operandTypeForUsage

unordered_map< HighLevelILOperandUsage, HighLevelILOperandType > HighLevelILInstructionBase::operandTypeForUsage
static

◆ operationOperandUsage

unordered_map< BNHighLevelILOperation, vector< HighLevelILOperandUsage > > HighLevelILInstructionBase::operationOperandUsage
static

◆ operationOperandIndex

unordered_map< BNHighLevelILOperation, unordered_map< HighLevelILOperandUsage, size_t > > HighLevelILInstructionBase::operationOperandIndex = GetOperandIndexForOperandUsages()
static

◆ BinaryNinja::HighLevelILInstruction

struct BinaryNinja::HighLevelILInstruction

Public Member Functions

 HighLevelILInstruction ()
 
 HighLevelILInstruction (HighLevelILFunction *func, const BNHighLevelILInstruction &instr, size_t expr, bool asFullAst, size_t instructionIndex)
 
 HighLevelILInstruction (const HighLevelILInstructionBase &instr)
 
void CollectSubExprs (std::stack< size_t > &toProcess) const
 
void VisitExprs (const std::function< bool(const HighLevelILInstruction &expr)> &func) const
 
void VisitExprs (const std::function< bool(const HighLevelILInstruction &expr)> &preFunc, const std::function< void(const HighLevelILInstruction &expr)> &postFunc) const
 
ExprId CopyTo (HighLevelILFunction *dest) const
 
ExprId CopyTo (HighLevelILFunction *dest, const std::function< ExprId(const HighLevelILInstruction &subExpr)> &subExprHandler) const
 
bool operator< (const HighLevelILInstruction &other) const
 
bool operator== (const HighLevelILInstruction &other) const
 
bool operator!= (const HighLevelILInstruction &other) const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetSourceExpr () const
 
template<BNHighLevelILOperation N>
Variable GetVariable () const
 
template<BNHighLevelILOperation N>
Variable GetDestVariable () const
 
template<BNHighLevelILOperation N>
SSAVariable GetSSAVariable () const
 
template<BNHighLevelILOperation N>
SSAVariable GetDestSSAVariable () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetDestExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetLeftExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetRightExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetCarryExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetIndexExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetConditionPhiExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetConditionExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetTrueExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetFalseExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetLoopExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetInitExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetUpdateExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetDefaultExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetHighExpr () const
 
template<BNHighLevelILOperation N>
HighLevelILInstruction GetLowExpr () const
 
template<BNHighLevelILOperation N>
uint64_t GetOffset () const
 
template<BNHighLevelILOperation N>
size_t GetMemberIndex () const
 
template<BNHighLevelILOperation N>
int64_t GetConstant () const
 
template<BNHighLevelILOperation N>
ConstantData GetConstantData () const
 
template<BNHighLevelILOperation N>
int64_t GetVector () const
 
template<BNHighLevelILOperation N>
uint32_t GetIntrinsic () const
 
template<BNHighLevelILOperation N>
uint64_t GetTarget () const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionList GetParameterExprs () const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionList GetSourceExprs () const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionList GetDestExprs () const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionList GetBlockExprs () const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionList GetCases () const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionList GetValueExprs () const
 
template<BNHighLevelILOperation N>
HighLevelILSSAVariableList GetSourceSSAVariables () const
 
template<BNHighLevelILOperation N>
size_t GetSourceMemoryVersion () const
 
template<BNHighLevelILOperation N>
HighLevelILIndexList GetSourceMemoryVersions () const
 
template<BNHighLevelILOperation N>
size_t GetDestMemoryVersion () const
 
template<BNHighLevelILOperation N>
void SetSSAVersion (size_t version)
 
template<BNHighLevelILOperation N>
void SetDestSSAVersion (size_t version)
 
template<BNHighLevelILOperation N>
void SetParameterExprs (const std::vector< MediumLevelILInstruction > &params)
 
template<BNHighLevelILOperation N>
void SetParameterExprs (const std::vector< ExprId > &params)
 
template<BNHighLevelILOperation N>
void SetSourceExprs (const std::vector< MediumLevelILInstruction > &params)
 
template<BNHighLevelILOperation N>
void SetSourceExprs (const std::vector< ExprId > &params)
 
template<BNHighLevelILOperation N>
void SetDestExprs (const std::vector< MediumLevelILInstruction > &params)
 
template<BNHighLevelILOperation N>
void SetDestExprs (const std::vector< ExprId > &params)
 
template<BNHighLevelILOperation N>
void SetBlockExprs (const std::vector< MediumLevelILInstruction > &params)
 
template<BNHighLevelILOperation N>
void SetBlockExprs (const std::vector< ExprId > &params)
 
template<BNHighLevelILOperation N>
void SetCases (const std::vector< MediumLevelILInstruction > &params)
 
template<BNHighLevelILOperation N>
void SetCases (const std::vector< ExprId > &params)
 
template<BNHighLevelILOperation N>
void SetSourceSSAVariables (const std::vector< SSAVariable > &vars)
 
template<BNHighLevelILOperation N>
void SetSourceMemoryVersion (size_t version)
 
template<BNHighLevelILOperation N>
void SetDestMemoryVersion (size_t version)
 
template<BNHighLevelILOperation N>
void SetTarget (uint64_t target)
 
bool GetOperandIndexForUsage (HighLevelILOperandUsage usage, size_t &operandIndex) const
 
HighLevelILInstruction GetSourceExpr () const
 
Variable GetVariable () const
 
Variable GetDestVariable () const
 
SSAVariable GetSSAVariable () const
 
SSAVariable GetDestSSAVariable () const
 
HighLevelILInstruction GetDestExpr () const
 
HighLevelILInstruction GetLeftExpr () const
 
HighLevelILInstruction GetRightExpr () const
 
HighLevelILInstruction GetCarryExpr () const
 
HighLevelILInstruction GetIndexExpr () const
 
HighLevelILInstruction GetConditionExpr () const
 
HighLevelILInstruction GetConditionPhiExpr () const
 
HighLevelILInstruction GetTrueExpr () const
 
HighLevelILInstruction GetFalseExpr () const
 
HighLevelILInstruction GetLoopExpr () const
 
HighLevelILInstruction GetInitExpr () const
 
HighLevelILInstruction GetUpdateExpr () const
 
HighLevelILInstruction GetDefaultExpr () const
 
HighLevelILInstruction GetHighExpr () const
 
HighLevelILInstruction GetLowExpr () const
 
uint64_t GetOffset () const
 
size_t GetMemberIndex () const
 
int64_t GetConstant () const
 
ConstantData GetConstantData () const
 
int64_t GetVector () const
 
uint32_t GetIntrinsic () const
 
uint64_t GetTarget () const
 
HighLevelILInstructionList GetParameterExprs () const
 
HighLevelILInstructionList GetSourceExprs () const
 
HighLevelILInstructionList GetDestExprs () const
 
HighLevelILInstructionList GetBlockExprs () const
 
HighLevelILInstructionList GetCases () const
 
HighLevelILInstructionList GetValueExprs () const
 
HighLevelILSSAVariableList GetSourceSSAVariables () const
 
size_t GetSourceMemoryVersion () const
 
HighLevelILIndexList GetSourceMemoryVersions () const
 
size_t GetDestMemoryVersion () const
 
- Public Member Functions inherited from BinaryNinja::HighLevelILInstructionBase
HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Static Public Member Functions

static bool CanCollapse (int operand)
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 
- Static Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Constructor & Destructor Documentation

◆ HighLevelILInstruction() [1/3]

HighLevelILInstruction::HighLevelILInstruction ( )

◆ HighLevelILInstruction() [2/3]

HighLevelILInstruction::HighLevelILInstruction ( HighLevelILFunction * func,
const BNHighLevelILInstruction & instr,
size_t expr,
bool asFullAst,
size_t instructionIndex )

◆ HighLevelILInstruction() [3/3]

HighLevelILInstruction::HighLevelILInstruction ( const HighLevelILInstructionBase & instr)

Member Function Documentation

◆ CollectSubExprs()

void HighLevelILInstruction::CollectSubExprs ( std::stack< size_t > & toProcess) const

◆ VisitExprs() [1/2]

void HighLevelILInstruction::VisitExprs ( const std::function< bool(const HighLevelILInstruction &expr)> & func) const

◆ VisitExprs() [2/2]

void HighLevelILInstruction::VisitExprs ( const std::function< bool(const HighLevelILInstruction &expr)> & preFunc,
const std::function< void(const HighLevelILInstruction &expr)> & postFunc ) const

◆ CopyTo() [1/2]

ExprId HighLevelILInstruction::CopyTo ( HighLevelILFunction * dest) const

◆ CopyTo() [2/2]

ExprId HighLevelILInstruction::CopyTo ( HighLevelILFunction * dest,
const std::function< ExprId(const HighLevelILInstruction &subExpr)> & subExprHandler ) const

◆ operator<()

bool HighLevelILInstruction::operator< ( const HighLevelILInstruction & other) const

◆ operator==()

bool HighLevelILInstruction::operator== ( const HighLevelILInstruction & other) const

◆ operator!=()

bool HighLevelILInstruction::operator!= ( const HighLevelILInstruction & other) const

◆ GetSourceExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetSourceExpr ( ) const
inline

◆ GetVariable() [1/2]

Variable BinaryNinja::HighLevelILInstruction::GetVariable ( ) const
inline

◆ GetDestVariable() [1/2]

Variable BinaryNinja::HighLevelILInstruction::GetDestVariable ( ) const
inline

◆ GetSSAVariable() [1/2]

SSAVariable BinaryNinja::HighLevelILInstruction::GetSSAVariable ( ) const
inline

◆ GetDestSSAVariable() [1/2]

SSAVariable BinaryNinja::HighLevelILInstruction::GetDestSSAVariable ( ) const
inline

◆ GetDestExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetDestExpr ( ) const
inline

◆ GetLeftExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetLeftExpr ( ) const
inline

◆ GetRightExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetRightExpr ( ) const
inline

◆ GetCarryExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetCarryExpr ( ) const
inline

◆ GetIndexExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetIndexExpr ( ) const
inline

◆ GetConditionPhiExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetConditionPhiExpr ( ) const
inline

◆ GetConditionExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetConditionExpr ( ) const
inline

◆ GetTrueExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetTrueExpr ( ) const
inline

◆ GetFalseExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetFalseExpr ( ) const
inline

◆ GetLoopExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetLoopExpr ( ) const
inline

◆ GetInitExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetInitExpr ( ) const
inline

◆ GetUpdateExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetUpdateExpr ( ) const
inline

◆ GetDefaultExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetDefaultExpr ( ) const
inline

◆ GetHighExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetHighExpr ( ) const
inline

◆ GetLowExpr() [1/2]

HighLevelILInstruction BinaryNinja::HighLevelILInstruction::GetLowExpr ( ) const
inline

◆ GetOffset() [1/2]

uint64_t BinaryNinja::HighLevelILInstruction::GetOffset ( ) const
inline

◆ GetMemberIndex() [1/2]

size_t BinaryNinja::HighLevelILInstruction::GetMemberIndex ( ) const
inline

◆ GetConstant() [1/2]

int64_t BinaryNinja::HighLevelILInstruction::GetConstant ( ) const
inline

◆ GetConstantData() [1/2]

ConstantData BinaryNinja::HighLevelILInstruction::GetConstantData ( ) const
inline

◆ GetVector() [1/2]

int64_t BinaryNinja::HighLevelILInstruction::GetVector ( ) const
inline

◆ GetIntrinsic() [1/2]

uint32_t BinaryNinja::HighLevelILInstruction::GetIntrinsic ( ) const
inline

◆ GetTarget() [1/2]

uint64_t BinaryNinja::HighLevelILInstruction::GetTarget ( ) const
inline

◆ GetParameterExprs() [1/2]

HighLevelILInstructionList BinaryNinja::HighLevelILInstruction::GetParameterExprs ( ) const
inline

◆ GetSourceExprs() [1/2]

HighLevelILInstructionList BinaryNinja::HighLevelILInstruction::GetSourceExprs ( ) const
inline

◆ GetDestExprs() [1/2]

HighLevelILInstructionList BinaryNinja::HighLevelILInstruction::GetDestExprs ( ) const
inline

◆ GetBlockExprs() [1/2]

HighLevelILInstructionList BinaryNinja::HighLevelILInstruction::GetBlockExprs ( ) const
inline

◆ GetCases() [1/2]

HighLevelILInstructionList BinaryNinja::HighLevelILInstruction::GetCases ( ) const
inline

◆ GetValueExprs() [1/2]

HighLevelILInstructionList BinaryNinja::HighLevelILInstruction::GetValueExprs ( ) const
inline

◆ GetSourceSSAVariables() [1/2]

HighLevelILSSAVariableList BinaryNinja::HighLevelILInstruction::GetSourceSSAVariables ( ) const
inline

◆ GetSourceMemoryVersion() [1/2]

size_t BinaryNinja::HighLevelILInstruction::GetSourceMemoryVersion ( ) const
inline

◆ GetSourceMemoryVersions() [1/2]

HighLevelILIndexList BinaryNinja::HighLevelILInstruction::GetSourceMemoryVersions ( ) const
inline

◆ GetDestMemoryVersion() [1/2]

size_t BinaryNinja::HighLevelILInstruction::GetDestMemoryVersion ( ) const
inline

◆ SetSSAVersion()

void BinaryNinja::HighLevelILInstruction::SetSSAVersion ( size_t version)
inline

◆ SetDestSSAVersion()

void BinaryNinja::HighLevelILInstruction::SetDestSSAVersion ( size_t version)
inline

◆ SetParameterExprs() [1/2]

void BinaryNinja::HighLevelILInstruction::SetParameterExprs ( const std::vector< MediumLevelILInstruction > & params)
inline

◆ SetParameterExprs() [2/2]

void BinaryNinja::HighLevelILInstruction::SetParameterExprs ( const std::vector< ExprId > & params)
inline

◆ SetSourceExprs() [1/2]

void BinaryNinja::HighLevelILInstruction::SetSourceExprs ( const std::vector< MediumLevelILInstruction > & params)
inline

◆ SetSourceExprs() [2/2]

void BinaryNinja::HighLevelILInstruction::SetSourceExprs ( const std::vector< ExprId > & params)
inline

◆ SetDestExprs() [1/2]

void BinaryNinja::HighLevelILInstruction::SetDestExprs ( const std::vector< MediumLevelILInstruction > & params)
inline

◆ SetDestExprs() [2/2]

void BinaryNinja::HighLevelILInstruction::SetDestExprs ( const std::vector< ExprId > & params)
inline

◆ SetBlockExprs() [1/2]

void BinaryNinja::HighLevelILInstruction::SetBlockExprs ( const std::vector< MediumLevelILInstruction > & params)
inline

◆ SetBlockExprs() [2/2]

void BinaryNinja::HighLevelILInstruction::SetBlockExprs ( const std::vector< ExprId > & params)
inline

◆ SetCases() [1/2]

void BinaryNinja::HighLevelILInstruction::SetCases ( const std::vector< MediumLevelILInstruction > & params)
inline

◆ SetCases() [2/2]

void BinaryNinja::HighLevelILInstruction::SetCases ( const std::vector< ExprId > & params)
inline

◆ SetSourceSSAVariables()

void BinaryNinja::HighLevelILInstruction::SetSourceSSAVariables ( const std::vector< SSAVariable > & vars)
inline

◆ SetSourceMemoryVersion()

void BinaryNinja::HighLevelILInstruction::SetSourceMemoryVersion ( size_t version)
inline

◆ SetDestMemoryVersion()

void BinaryNinja::HighLevelILInstruction::SetDestMemoryVersion ( size_t version)
inline

◆ SetTarget()

void BinaryNinja::HighLevelILInstruction::SetTarget ( uint64_t target)
inline

◆ GetOperandIndexForUsage()

bool HighLevelILInstruction::GetOperandIndexForUsage ( HighLevelILOperandUsage usage,
size_t & operandIndex ) const

◆ GetSourceExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetSourceExpr ( ) const

◆ GetVariable() [2/2]

Variable HighLevelILInstruction::GetVariable ( ) const

◆ GetDestVariable() [2/2]

Variable HighLevelILInstruction::GetDestVariable ( ) const

◆ GetSSAVariable() [2/2]

SSAVariable HighLevelILInstruction::GetSSAVariable ( ) const

◆ GetDestSSAVariable() [2/2]

SSAVariable HighLevelILInstruction::GetDestSSAVariable ( ) const

◆ GetDestExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetDestExpr ( ) const

◆ GetLeftExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetLeftExpr ( ) const

◆ GetRightExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetRightExpr ( ) const

◆ GetCarryExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetCarryExpr ( ) const

◆ GetIndexExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetIndexExpr ( ) const

◆ GetConditionExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetConditionExpr ( ) const

◆ GetConditionPhiExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetConditionPhiExpr ( ) const

◆ GetTrueExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetTrueExpr ( ) const

◆ GetFalseExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetFalseExpr ( ) const

◆ GetLoopExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetLoopExpr ( ) const

◆ GetInitExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetInitExpr ( ) const

◆ GetUpdateExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetUpdateExpr ( ) const

◆ GetDefaultExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetDefaultExpr ( ) const

◆ GetHighExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetHighExpr ( ) const

◆ GetLowExpr() [2/2]

HighLevelILInstruction HighLevelILInstruction::GetLowExpr ( ) const

◆ GetOffset() [2/2]

uint64_t HighLevelILInstruction::GetOffset ( ) const

◆ GetMemberIndex() [2/2]

size_t HighLevelILInstruction::GetMemberIndex ( ) const

◆ GetConstant() [2/2]

int64_t HighLevelILInstruction::GetConstant ( ) const

◆ GetConstantData() [2/2]

ConstantData HighLevelILInstruction::GetConstantData ( ) const

◆ GetVector() [2/2]

int64_t HighLevelILInstruction::GetVector ( ) const

◆ GetIntrinsic() [2/2]

uint32_t HighLevelILInstruction::GetIntrinsic ( ) const

◆ GetTarget() [2/2]

uint64_t HighLevelILInstruction::GetTarget ( ) const

◆ GetParameterExprs() [2/2]

HighLevelILInstructionList HighLevelILInstruction::GetParameterExprs ( ) const

◆ GetSourceExprs() [2/2]

HighLevelILInstructionList HighLevelILInstruction::GetSourceExprs ( ) const

◆ GetDestExprs() [2/2]

HighLevelILInstructionList HighLevelILInstruction::GetDestExprs ( ) const

◆ GetBlockExprs() [2/2]

HighLevelILInstructionList HighLevelILInstruction::GetBlockExprs ( ) const

◆ GetCases() [2/2]

HighLevelILInstructionList HighLevelILInstruction::GetCases ( ) const

◆ GetValueExprs() [2/2]

HighLevelILInstructionList HighLevelILInstruction::GetValueExprs ( ) const

◆ GetSourceSSAVariables() [2/2]

HighLevelILSSAVariableList HighLevelILInstruction::GetSourceSSAVariables ( ) const

◆ GetSourceMemoryVersion() [2/2]

size_t HighLevelILInstruction::GetSourceMemoryVersion ( ) const

◆ GetSourceMemoryVersions() [2/2]

HighLevelILIndexList HighLevelILInstruction::GetSourceMemoryVersions ( ) const

◆ GetDestMemoryVersion() [2/2]

size_t HighLevelILInstruction::GetDestMemoryVersion ( ) const

◆ CanCollapse()

bool HighLevelILInstruction::CanCollapse ( int operand)
static

◆ BinaryNinja::HighLevelILOperand

class BinaryNinja::HighLevelILOperand

Public Member Functions

 HighLevelILOperand (const HighLevelILInstruction &instr, HighLevelILOperandUsage usage, size_t operandIndex)
 
HighLevelILOperandType GetType () const
 
HighLevelILOperandUsage GetUsage () const
 
uint64_t GetInteger () const
 
ConstantData GetConstantData () const
 
size_t GetIndex () const
 
uint32_t GetIntrinsic () const
 
HighLevelILInstruction GetExpr () const
 
Variable GetVariable () const
 
SSAVariable GetSSAVariable () const
 
HighLevelILInstructionList GetExprList () const
 
HighLevelILSSAVariableList GetSSAVariableList () const
 
HighLevelILIndexList GetIndexList () const
 

Constructor & Destructor Documentation

◆ HighLevelILOperand()

HighLevelILOperand::HighLevelILOperand ( const HighLevelILInstruction & instr,
HighLevelILOperandUsage usage,
size_t operandIndex )

Member Function Documentation

◆ GetType()

HighLevelILOperandType BinaryNinja::HighLevelILOperand::GetType ( ) const
inline

◆ GetUsage()

HighLevelILOperandUsage BinaryNinja::HighLevelILOperand::GetUsage ( ) const
inline

◆ GetInteger()

uint64_t HighLevelILOperand::GetInteger ( ) const

◆ GetConstantData()

ConstantData HighLevelILOperand::GetConstantData ( ) const

◆ GetIndex()

size_t HighLevelILOperand::GetIndex ( ) const

◆ GetIntrinsic()

uint32_t HighLevelILOperand::GetIntrinsic ( ) const

◆ GetExpr()

HighLevelILInstruction HighLevelILOperand::GetExpr ( ) const

◆ GetVariable()

Variable HighLevelILOperand::GetVariable ( ) const

◆ GetSSAVariable()

SSAVariable HighLevelILOperand::GetSSAVariable ( ) const

◆ GetExprList()

HighLevelILInstructionList HighLevelILOperand::GetExprList ( ) const

◆ GetSSAVariableList()

HighLevelILSSAVariableList HighLevelILOperand::GetSSAVariableList ( ) const

◆ GetIndexList()

HighLevelILIndexList HighLevelILOperand::GetIndexList ( ) const

◆ BinaryNinja::HighLevelILOperandList

class BinaryNinja::HighLevelILOperandList

Public Types

typedef ListIterator const_iterator
 

Public Member Functions

 HighLevelILOperandList (const HighLevelILInstruction &instr, const std::vector< HighLevelILOperandUsage > &usageList, const std::unordered_map< HighLevelILOperandUsage, size_t > &operandIndexMap)
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 
const HighLevelILOperand operator[] (size_t i) const
 
 operator std::vector< HighLevelILOperand > () const
 

Member Typedef Documentation

◆ const_iterator

Constructor & Destructor Documentation

◆ HighLevelILOperandList()

HighLevelILOperandList::HighLevelILOperandList ( const HighLevelILInstruction & instr,
const std::vector< HighLevelILOperandUsage > & usageList,
const std::unordered_map< HighLevelILOperandUsage, size_t > & operandIndexMap )

Member Function Documentation

◆ begin()

HighLevelILOperandList::const_iterator HighLevelILOperandList::begin ( ) const

◆ end()

HighLevelILOperandList::const_iterator HighLevelILOperandList::end ( ) const

◆ size()

size_t HighLevelILOperandList::size ( ) const

◆ operator[]()

const HighLevelILOperand HighLevelILOperandList::operator[] ( size_t i) const

◆ operator std::vector< HighLevelILOperand >()

BinaryNinja::HighLevelILOperandList::operator std::vector< HighLevelILOperand > ( ) const

◆ BinaryNinja::HighLevelILConstantInstruction

struct BinaryNinja::HighLevelILConstantInstruction

Public Member Functions

int64_t GetConstant () const
 
- Public Member Functions inherited from BinaryNinja::HighLevelILInstructionBase
HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 
- Static Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Member Function Documentation

◆ GetConstant()

int64_t BinaryNinja::HighLevelILConstantInstruction::GetConstant ( ) const
inline

◆ BinaryNinja::HighLevelILConstantDataInstruction

struct BinaryNinja::HighLevelILConstantDataInstruction

Public Member Functions

ConstantData GetConstantData () const
 
- Public Member Functions inherited from BinaryNinja::HighLevelILInstructionBase
HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 
- Static Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Member Function Documentation

◆ GetConstantData()

ConstantData BinaryNinja::HighLevelILConstantDataInstruction::GetConstantData ( ) const
inline

◆ BinaryNinja::HighLevelILOneOperandInstruction

struct BinaryNinja::HighLevelILOneOperandInstruction

Public Member Functions

HighLevelILInstruction GetSourceExpr () const
 
- Public Member Functions inherited from BinaryNinja::HighLevelILInstructionBase
HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 
- Static Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Member Function Documentation

◆ GetSourceExpr()

HighLevelILInstruction BinaryNinja::HighLevelILOneOperandInstruction::GetSourceExpr ( ) const
inline

◆ BinaryNinja::HighLevelILTwoOperandInstruction

struct BinaryNinja::HighLevelILTwoOperandInstruction

Public Member Functions

HighLevelILInstruction GetLeftExpr () const
 
HighLevelILInstruction GetRightExpr () const
 
- Public Member Functions inherited from BinaryNinja::HighLevelILInstructionBase
HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 
- Static Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Member Function Documentation

◆ GetLeftExpr()

HighLevelILInstruction BinaryNinja::HighLevelILTwoOperandInstruction::GetLeftExpr ( ) const
inline

◆ GetRightExpr()

HighLevelILInstruction BinaryNinja::HighLevelILTwoOperandInstruction::GetRightExpr ( ) const
inline

◆ BinaryNinja::HighLevelILTwoOperandWithCarryInstruction

struct BinaryNinja::HighLevelILTwoOperandWithCarryInstruction

Public Member Functions

HighLevelILInstruction GetLeftExpr () const
 
HighLevelILInstruction GetRightExpr () const
 
HighLevelILInstruction GetCarryExpr () const
 
- Public Member Functions inherited from BinaryNinja::HighLevelILInstructionBase
HighLevelILOperandList GetOperands () const
 
uint64_t GetRawOperandAsInteger (size_t operand) const
 
ConstantData GetRawOperandAsConstantData (size_t operand) const
 
size_t GetRawOperandAsIndex (size_t operand) const
 
HighLevelILInstruction GetRawOperandAsExpr (size_t operand) const
 
Variable GetRawOperandAsVariable (size_t operand) const
 
SSAVariable GetRawOperandAsSSAVariable (size_t operand) const
 
HighLevelILInstructionList GetRawOperandAsExprList (size_t operand) const
 
HighLevelILSSAVariableList GetRawOperandAsSSAVariableList (size_t operand) const
 
HighLevelILIndexList GetRawOperandAsIndexList (size_t operand) const
 
void UpdateRawOperand (size_t operandIndex, ExprId value)
 
void UpdateRawOperandAsInteger (size_t operandIndex, uint64_t value)
 
void UpdateRawOperandAsSSAVariableList (size_t operandIndex, const std::vector< SSAVariable > &vars)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< HighLevelILInstruction > &exprs)
 
void UpdateRawOperandAsExprList (size_t operandIndex, const std::vector< size_t > &exprs)
 
RegisterValue GetValue () const
 
PossibleValueSet GetPossibleValues (const std::set< BNDataFlowQueryOption > &options=std::set< BNDataFlowQueryOption >()) const
 
Confidence< Ref< Type > > GetType () const
 
size_t GetSSAExprIndex () const
 
size_t GetNonSSAExprIndex () const
 
HighLevelILInstruction GetSSAForm () const
 
HighLevelILInstruction GetNonSSAForm () const
 
size_t GetMediumLevelILExprIndex () const
 
bool HasMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelIL () const
 
MediumLevelILInstruction GetMediumLevelILSSAForm () const
 
char * Dump () const
 
void Replace (ExprId expr)
 
void SetAttributes (uint32_t attributes)
 
void SetAttribute (BNILInstructionAttribute attribute, bool state=true)
 
void ClearAttribute (BNILInstructionAttribute attribute)
 
size_t GetInstructionIndex () const
 
HighLevelILInstruction GetInstruction () const
 
HighLevelILInstruction AsAST () const
 
HighLevelILInstruction AsNonAST () const
 
bool HasParent () const
 
HighLevelILInstruction GetParent () const
 
uint64_t GetInstructionHash (size_t discriminator=0) const
 
template<BNHighLevelILOperation N>
HighLevelILInstructionAccessor< N > & As ()
 
HighLevelILOneOperandInstructionAsOneOperand ()
 
HighLevelILTwoOperandInstructionAsTwoOperand ()
 
HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry ()
 
template<BNHighLevelILOperation N>
const HighLevelILInstructionAccessor< N > & As () const
 
const HighLevelILConstantInstructionAsConstant () const
 
const HighLevelILConstantDataInstructionAsConstantData () const
 
const HighLevelILOneOperandInstructionAsOneOperand () const
 
const HighLevelILTwoOperandInstructionAsTwoOperand () const
 
const HighLevelILTwoOperandWithCarryInstructionAsTwoOperandWithCarry () const
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
Ref< HighLevelILFunctionfunction = nullptr
 
size_t exprIndex
 
size_t instructionIndex
 
bool ast
 
- Public Attributes inherited from BNHighLevelILInstruction
BNHighLevelILOperation operation
 
uint32_t attributes
 
uint32_t sourceOperand
 
size_t size
 
uint64_t operands [5]
 
uint64_t address
 
size_t parent
 
- Static Public Attributes inherited from BinaryNinja::HighLevelILInstructionBase
static std::unordered_map< HighLevelILOperandUsage, HighLevelILOperandTypeoperandTypeForUsage
 
static std::unordered_map< BNHighLevelILOperation, std::vector< HighLevelILOperandUsage > > operationOperandUsage
 
static std::unordered_map< BNHighLevelILOperation, std::unordered_map< HighLevelILOperandUsage, size_t > > operationOperandIndex = GetOperandIndexForOperandUsages()
 

Member Function Documentation

◆ GetLeftExpr()

HighLevelILInstruction BinaryNinja::HighLevelILTwoOperandWithCarryInstruction::GetLeftExpr ( ) const
inline

◆ GetRightExpr()

HighLevelILInstruction BinaryNinja::HighLevelILTwoOperandWithCarryInstruction::GetRightExpr ( ) const
inline

◆ GetCarryExpr()

HighLevelILInstruction BinaryNinja::HighLevelILTwoOperandWithCarryInstruction::GetCarryExpr ( ) const
inline

Enumeration Type Documentation

◆ HighLevelILOperandType

Enumerator
IntegerHighLevelOperand 
ConstantDataHighLevelOperand 
IndexHighLevelOperand 
IntrinsicHighLevelOperand 
ExprHighLevelOperand 
VariableHighLevelOperand 
SSAVariableHighLevelOperand 
ExprListHighLevelOperand 
SSAVariableListHighLevelOperand 
IndexListHighLevelOperand 

◆ HighLevelILOperandUsage

Enumerator
SourceExprHighLevelOperandUsage 
VariableHighLevelOperandUsage 
DestVariableHighLevelOperandUsage 
SSAVariableHighLevelOperandUsage 
DestSSAVariableHighLevelOperandUsage 
DestExprHighLevelOperandUsage 
LeftExprHighLevelOperandUsage 
RightExprHighLevelOperandUsage 
CarryExprHighLevelOperandUsage 
IndexExprHighLevelOperandUsage 
ConditionExprHighLevelOperandUsage 
ConditionPhiExprHighLevelOperandUsage 
TrueExprHighLevelOperandUsage 
FalseExprHighLevelOperandUsage 
LoopExprHighLevelOperandUsage 
InitExprHighLevelOperandUsage 
UpdateExprHighLevelOperandUsage 
DefaultExprHighLevelOperandUsage 
HighExprHighLevelOperandUsage 
LowExprHighLevelOperandUsage 
OffsetHighLevelOperandUsage 
MemberIndexHighLevelOperandUsage 
ConstantHighLevelOperandUsage 
ConstantDataHighLevelOperandUsage 
VectorHighLevelOperandUsage 
IntrinsicHighLevelOperandUsage 
TargetHighLevelOperandUsage 
ParameterExprsHighLevelOperandUsage 
SourceExprsHighLevelOperandUsage 
DestExprsHighLevelOperandUsage 
BlockExprsHighLevelOperandUsage 
CasesHighLevelOperandUsage 
ValueExprsHighLevelOperandUsage 
SourceSSAVariablesHighLevelOperandUsage 
SourceMemoryVersionHighLevelOperandUsage 
SourceMemoryVersionsHighLevelOperandUsage 
DestMemoryVersionHighLevelOperandUsage