BinaryNinja::CoreArchitecture Class Reference

Public Member Functions

 CoreArchitecture (BNArchitecture *arch)
 
virtual BNEndianness GetEndianness () const override
 
virtual size_t GetAddressSize () const override
 
virtual size_t GetDefaultIntegerSize () const override
 
virtual size_t GetInstructionAlignment () const override
 
virtual size_t GetMaxInstructionLength () const override
 
virtual size_t GetOpcodeDisplayLength () const override
 
virtual Ref< ArchitectureGetAssociatedArchitectureByAddress (uint64_t &addr) override
 
virtual bool GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result) override
 
virtual bool GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result) override
 
virtual bool GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il) override
 GetInstructionLowLevelIL Translates an instruction at addr and appends it onto the LowLevelILFunction& il. More...
 
virtual std::string GetRegisterName (uint32_t reg) override
 
virtual std::string GetFlagName (uint32_t flag) override
 
virtual std::string GetFlagWriteTypeName (uint32_t flags) override
 
virtual std::string GetSemanticFlagClassName (uint32_t semClass) override
 
virtual std::string GetSemanticFlagGroupName (uint32_t semGroup) override
 
virtual std::vector< uint32_t > GetFullWidthRegisters () override
 
virtual std::vector< uint32_t > GetAllRegisters () override
 
virtual std::vector< uint32_t > GetAllFlags () override
 
virtual std::vector< uint32_t > GetAllFlagWriteTypes () override
 
virtual std::vector< uint32_t > GetAllSemanticFlagClasses () override
 
virtual std::vector< uint32_t > GetAllSemanticFlagGroups () override
 
virtual BNFlagRole GetFlagRole (uint32_t flag, uint32_t semClass=0) override
 
virtual std::vector< uint32_t > GetFlagsRequiredForFlagCondition (BNLowLevelILFlagCondition cond, uint32_t semClass=0) override
 
virtual std::vector< uint32_t > GetFlagsRequiredForSemanticFlagGroup (uint32_t semGroup) override
 
virtual std::map< uint32_t, BNLowLevelILFlagConditionGetFlagConditionsForSemanticFlagGroup (uint32_t semGroup) override
 
virtual std::vector< uint32_t > GetFlagsWrittenByFlagWriteType (uint32_t writeType) override
 
virtual uint32_t GetSemanticClassForFlagWriteType (uint32_t writeType) override
 
virtual ExprId GetFlagWriteLowLevelIL (BNLowLevelILOperation op, size_t size, uint32_t flagWriteType, uint32_t flag, BNRegisterOrConstant *operands, size_t operandCount, LowLevelILFunction &il) override
 
virtual ExprId GetFlagConditionLowLevelIL (BNLowLevelILFlagCondition cond, uint32_t semClass, LowLevelILFunction &il) override
 
virtual ExprId GetSemanticFlagGroupLowLevelIL (uint32_t semGroup, LowLevelILFunction &il) override
 
virtual BNRegisterInfo GetRegisterInfo (uint32_t reg) override
 
virtual uint32_t GetStackPointerRegister () override
 
virtual uint32_t GetLinkRegister () override
 
virtual std::vector< uint32_t > GetGlobalRegisters () override
 
virtual std::vector< uint32_t > GetSystemRegisters () override
 
virtual std::string GetRegisterStackName (uint32_t regStack) override
 
virtual std::vector< uint32_t > GetAllRegisterStacks () override
 
virtual BNRegisterStackInfo GetRegisterStackInfo (uint32_t regStack) override
 
virtual std::string GetIntrinsicName (uint32_t intrinsic) override
 
virtual std::vector< uint32_t > GetAllIntrinsics () override
 
virtual std::vector< NameAndTypeGetIntrinsicInputs (uint32_t intrinsic) override
 
virtual std::vector< Confidence< Ref< Type > > > GetIntrinsicOutputs (uint32_t intrinsic) override
 
virtual bool CanAssemble () override
 
virtual bool Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors) override
 
virtual bool IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override
 IsNeverBranchPatchAvailable returns true if the instruction at addr can be patched to never branch. More...
 
virtual bool IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override
 IsAlwaysBranchPatchAvailable returns true if the instruction at addr can be patched to always branch. More...
 
virtual bool IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override
 IsInvertBranchPatchAvailable returns true if the instruction at addr can be patched to invert the branch. More...
 
virtual bool IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override
 IsSkipAndReturnZeroPatchAvailable returns true if the instruction at addr is a call that can be patched to return zero. More...
 
virtual bool IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override
 IsSkipAndReturnValuePatchAvailable returns true if the instruction at addr is a call that can be patched to return a value. More...
 
virtual bool ConvertToNop (uint8_t *data, uint64_t addr, size_t len) override
 ConvertToNop converts the instruction at addr to a no-operation instruction. More...
 
virtual bool AlwaysBranch (uint8_t *data, uint64_t addr, size_t len) override
 AlwaysBranch converts the conditional branch instruction at addr to an unconditional branch. More...
 
virtual bool InvertBranch (uint8_t *data, uint64_t addr, size_t len) override
 InvertBranch converts the conditional branch instruction at addr to its invert. More...
 
virtual bool SkipAndReturnValue (uint8_t *data, uint64_t addr, size_t len, uint64_t value) override
 SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value. More...
 
- Public Member Functions inherited from BinaryNinja::Architecture
 Architecture (const std::string &name)
 
std::string GetName () const
 
virtual BNEndianness GetEndianness () const =0
 
virtual size_t GetAddressSize () const =0
 
virtual size_t GetDefaultIntegerSize () const
 
virtual size_t GetInstructionAlignment () const
 
virtual size_t GetMaxInstructionLength () const
 
virtual size_t GetOpcodeDisplayLength () const
 
virtual Ref< ArchitectureGetAssociatedArchitectureByAddress (uint64_t &addr)
 
virtual bool GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result)=0
 
virtual bool GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result)=0
 
virtual bool GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il)
 GetInstructionLowLevelIL Translates an instruction at addr and appends it onto the LowLevelILFunction& il. More...
 
virtual std::string GetRegisterName (uint32_t reg)
 
virtual std::string GetFlagName (uint32_t flag)
 
virtual std::string GetFlagWriteTypeName (uint32_t flags)
 
virtual std::string GetSemanticFlagClassName (uint32_t semClass)
 
virtual std::string GetSemanticFlagGroupName (uint32_t semGroup)
 
virtual std::vector< uint32_t > GetFullWidthRegisters ()
 
virtual std::vector< uint32_t > GetAllRegisters ()
 
virtual std::vector< uint32_t > GetAllFlags ()
 
virtual std::vector< uint32_t > GetAllFlagWriteTypes ()
 
virtual std::vector< uint32_t > GetAllSemanticFlagClasses ()
 
virtual std::vector< uint32_t > GetAllSemanticFlagGroups ()
 
virtual BNFlagRole GetFlagRole (uint32_t flag, uint32_t semClass=0)
 
virtual std::vector< uint32_t > GetFlagsRequiredForFlagCondition (BNLowLevelILFlagCondition cond, uint32_t semClass=0)
 
virtual std::vector< uint32_t > GetFlagsRequiredForSemanticFlagGroup (uint32_t semGroup)
 
virtual std::map< uint32_t, BNLowLevelILFlagConditionGetFlagConditionsForSemanticFlagGroup (uint32_t semGroup)
 
virtual std::vector< uint32_t > GetFlagsWrittenByFlagWriteType (uint32_t writeType)
 
virtual uint32_t GetSemanticClassForFlagWriteType (uint32_t writeType)
 
virtual ExprId GetFlagWriteLowLevelIL (BNLowLevelILOperation op, size_t size, uint32_t flagWriteType, uint32_t flag, BNRegisterOrConstant *operands, size_t operandCount, LowLevelILFunction &il)
 
ExprId GetDefaultFlagWriteLowLevelIL (BNLowLevelILOperation op, size_t size, BNFlagRole role, BNRegisterOrConstant *operands, size_t operandCount, LowLevelILFunction &il)
 
virtual ExprId GetFlagConditionLowLevelIL (BNLowLevelILFlagCondition cond, uint32_t semClass, LowLevelILFunction &il)
 
ExprId GetDefaultFlagConditionLowLevelIL (BNLowLevelILFlagCondition cond, uint32_t semClass, LowLevelILFunction &il)
 
virtual ExprId GetSemanticFlagGroupLowLevelIL (uint32_t semGroup, LowLevelILFunction &il)
 
virtual BNRegisterInfo GetRegisterInfo (uint32_t reg)
 
virtual uint32_t GetStackPointerRegister ()
 
virtual uint32_t GetLinkRegister ()
 
virtual std::vector< uint32_t > GetGlobalRegisters ()
 
bool IsGlobalRegister (uint32_t reg)
 
virtual std::vector< uint32_t > GetSystemRegisters ()
 
bool IsSystemRegister (uint32_t reg)
 
std::vector< uint32_t > GetModifiedRegistersOnWrite (uint32_t reg)
 
uint32_t GetRegisterByName (const std::string &name)
 
virtual std::string GetRegisterStackName (uint32_t regStack)
 
virtual std::vector< uint32_t > GetAllRegisterStacks ()
 
virtual BNRegisterStackInfo GetRegisterStackInfo (uint32_t regStack)
 
uint32_t GetRegisterStackForRegister (uint32_t reg)
 
virtual std::string GetIntrinsicName (uint32_t intrinsic)
 
virtual std::vector< uint32_t > GetAllIntrinsics ()
 
virtual std::vector< NameAndTypeGetIntrinsicInputs (uint32_t intrinsic)
 
virtual std::vector< Confidence< Ref< Type > > > GetIntrinsicOutputs (uint32_t intrinsic)
 
virtual bool CanAssemble ()
 
virtual bool Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors)
 
virtual bool IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len)
 IsNeverBranchPatchAvailable returns true if the instruction at addr can be patched to never branch. More...
 
virtual bool IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len)
 IsAlwaysBranchPatchAvailable returns true if the instruction at addr can be patched to always branch. More...
 
virtual bool IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len)
 IsInvertBranchPatchAvailable returns true if the instruction at addr can be patched to invert the branch. More...
 
virtual bool IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len)
 IsSkipAndReturnZeroPatchAvailable returns true if the instruction at addr is a call that can be patched to return zero. More...
 
virtual bool IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len)
 IsSkipAndReturnValuePatchAvailable returns true if the instruction at addr is a call that can be patched to return a value. More...
 
virtual bool ConvertToNop (uint8_t *data, uint64_t addr, size_t len)
 ConvertToNop converts the instruction at addr to a no-operation instruction. More...
 
virtual bool AlwaysBranch (uint8_t *data, uint64_t addr, size_t len)
 AlwaysBranch converts the conditional branch instruction at addr to an unconditional branch. More...
 
virtual bool InvertBranch (uint8_t *data, uint64_t addr, size_t len)
 InvertBranch converts the conditional branch instruction at addr to its invert. More...
 
virtual bool SkipAndReturnValue (uint8_t *data, uint64_t addr, size_t len, uint64_t value)
 SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value. More...
 
void RegisterFunctionRecognizer (FunctionRecognizer *recog)
 
void RegisterRelocationHandler (const std::string &viewName, RelocationHandler *handler)
 
Ref< RelocationHandlerGetRelocationHandler (const std::string &viewName)
 
bool IsBinaryViewTypeConstantDefined (const std::string &type, const std::string &name)
 
uint64_t GetBinaryViewTypeConstant (const std::string &type, const std::string &name, uint64_t defaultValue=0)
 
void SetBinaryViewTypeConstant (const std::string &type, const std::string &name, uint64_t value)
 
void RegisterCallingConvention (CallingConvention *cc)
 
std::vector< Ref< CallingConvention > > GetCallingConventions ()
 
Ref< CallingConventionGetCallingConventionByName (const std::string &name)
 
void SetDefaultCallingConvention (CallingConvention *cc)
 
void SetCdeclCallingConvention (CallingConvention *cc)
 
void SetStdcallCallingConvention (CallingConvention *cc)
 
void SetFastcallCallingConvention (CallingConvention *cc)
 
Ref< CallingConventionGetDefaultCallingConvention ()
 
Ref< CallingConventionGetCdeclCallingConvention ()
 
Ref< CallingConventionGetStdcallCallingConvention ()
 
Ref< CallingConventionGetFastcallCallingConvention ()
 
Ref< PlatformGetStandalonePlatform ()
 
void AddArchitectureRedirection (Architecture *from, Architecture *to)
 
- Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture >
 StaticCoreRefCountObject ()
 
virtual ~StaticCoreRefCountObject ()
 
BNArchitecture * GetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 

Additional Inherited Members

- Static Public Member Functions inherited from BinaryNinja::Architecture
static void Register (Architecture *arch)
 
static Ref< ArchitectureGetByName (const std::string &name)
 
static std::vector< Ref< Architecture > > GetList ()
 
- Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture >
static BNArchitecture * GetObject (StaticCoreRefCountObject *obj)
 
- Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture >
std::atomic< int > m_refs
 
BNArchitecture * m_object
 
- Protected Member Functions inherited from BinaryNinja::Architecture
 Architecture (BNArchitecture *arch)
 
virtual void Register (BNCustomArchitecture *callbacks)
 
- Static Protected Member Functions inherited from BinaryNinja::Architecture
static void InitCallback (void *ctxt, BNArchitecture *obj)
 
static BNEndianness GetEndiannessCallback (void *ctxt)
 
static size_t GetAddressSizeCallback (void *ctxt)
 
static size_t GetDefaultIntegerSizeCallback (void *ctxt)
 
static size_t GetInstructionAlignmentCallback (void *ctxt)
 
static size_t GetMaxInstructionLengthCallback (void *ctxt)
 
static size_t GetOpcodeDisplayLengthCallback (void *ctxt)
 
static BNArchitecture * GetAssociatedArchitectureByAddressCallback (void *ctxt, uint64_t *addr)
 
static bool GetInstructionInfoCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t maxLen, BNInstructionInfo *result)
 
static bool GetInstructionTextCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t *len, BNInstructionTextToken **result, size_t *count)
 
static void FreeInstructionTextCallback (BNInstructionTextToken *tokens, size_t count)
 
static bool GetInstructionLowLevelILCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t *len, BNLowLevelILFunction *il)
 
static char * GetRegisterNameCallback (void *ctxt, uint32_t reg)
 
static char * GetFlagNameCallback (void *ctxt, uint32_t flag)
 
static char * GetFlagWriteTypeNameCallback (void *ctxt, uint32_t flags)
 
static char * GetSemanticFlagClassNameCallback (void *ctxt, uint32_t semClass)
 
static char * GetSemanticFlagGroupNameCallback (void *ctxt, uint32_t semGroup)
 
static uint32_t * GetFullWidthRegistersCallback (void *ctxt, size_t *count)
 
static uint32_t * GetAllRegistersCallback (void *ctxt, size_t *count)
 
static uint32_t * GetAllFlagsCallback (void *ctxt, size_t *count)
 
static uint32_t * GetAllFlagWriteTypesCallback (void *ctxt, size_t *count)
 
static uint32_t * GetAllSemanticFlagClassesCallback (void *ctxt, size_t *count)
 
static uint32_t * GetAllSemanticFlagGroupsCallback (void *ctxt, size_t *count)
 
static BNFlagRole GetFlagRoleCallback (void *ctxt, uint32_t flag, uint32_t semClass)
 
static uint32_t * GetFlagsRequiredForFlagConditionCallback (void *ctxt, BNLowLevelILFlagCondition cond, uint32_t semClass, size_t *count)
 
static uint32_t * GetFlagsRequiredForSemanticFlagGroupCallback (void *ctxt, uint32_t semGroup, size_t *count)
 
static BNFlagConditionForSemanticClassGetFlagConditionsForSemanticFlagGroupCallback (void *ctxt, uint32_t semGroup, size_t *count)
 
static void FreeFlagConditionsForSemanticFlagGroupCallback (void *ctxt, BNFlagConditionForSemanticClass *conditions)
 
static uint32_t * GetFlagsWrittenByFlagWriteTypeCallback (void *ctxt, uint32_t writeType, size_t *count)
 
static uint32_t GetSemanticClassForFlagWriteTypeCallback (void *ctxt, uint32_t writeType)
 
static size_t GetFlagWriteLowLevelILCallback (void *ctxt, BNLowLevelILOperation op, size_t size, uint32_t flagWriteType, uint32_t flag, BNRegisterOrConstant *operands, size_t operandCount, BNLowLevelILFunction *il)
 
static size_t GetFlagConditionLowLevelILCallback (void *ctxt, BNLowLevelILFlagCondition cond, uint32_t semClass, BNLowLevelILFunction *il)
 
static size_t GetSemanticFlagGroupLowLevelILCallback (void *ctxt, uint32_t semGroup, BNLowLevelILFunction *il)
 
static void FreeRegisterListCallback (void *ctxt, uint32_t *regs)
 
static void GetRegisterInfoCallback (void *ctxt, uint32_t reg, BNRegisterInfo *result)
 
static uint32_t GetStackPointerRegisterCallback (void *ctxt)
 
static uint32_t GetLinkRegisterCallback (void *ctxt)
 
static uint32_t * GetGlobalRegistersCallback (void *ctxt, size_t *count)
 
static uint32_t * GetSystemRegistersCallback (void *ctxt, size_t *count)
 
static char * GetRegisterStackNameCallback (void *ctxt, uint32_t regStack)
 
static uint32_t * GetAllRegisterStacksCallback (void *ctxt, size_t *count)
 
static void GetRegisterStackInfoCallback (void *ctxt, uint32_t regStack, BNRegisterStackInfo *result)
 
static char * GetIntrinsicNameCallback (void *ctxt, uint32_t intrinsic)
 
static uint32_t * GetAllIntrinsicsCallback (void *ctxt, size_t *count)
 
static BNNameAndTypeGetIntrinsicInputsCallback (void *ctxt, uint32_t intrinsic, size_t *count)
 
static void FreeNameAndTypeListCallback (void *ctxt, BNNameAndType *nt, size_t count)
 
static BNTypeWithConfidenceGetIntrinsicOutputsCallback (void *ctxt, uint32_t intrinsic, size_t *count)
 
static void FreeTypeListCallback (void *ctxt, BNTypeWithConfidence *types, size_t count)
 
static bool CanAssembleCallback (void *ctxt)
 
static bool AssembleCallback (void *ctxt, const char *code, uint64_t addr, BNDataBuffer *result, char **errors)
 
static bool IsNeverBranchPatchAvailableCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t len)
 
static bool IsAlwaysBranchPatchAvailableCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t len)
 
static bool IsInvertBranchPatchAvailableCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t len)
 
static bool IsSkipAndReturnZeroPatchAvailableCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t len)
 
static bool IsSkipAndReturnValuePatchAvailableCallback (void *ctxt, const uint8_t *data, uint64_t addr, size_t len)
 
static bool ConvertToNopCallback (void *ctxt, uint8_t *data, uint64_t addr, size_t len)
 
static bool AlwaysBranchCallback (void *ctxt, uint8_t *data, uint64_t addr, size_t len)
 
static bool InvertBranchCallback (void *ctxt, uint8_t *data, uint64_t addr, size_t len)
 
static bool SkipAndReturnValueCallback (void *ctxt, uint8_t *data, uint64_t addr, size_t len, uint64_t value)
 
- Protected Attributes inherited from BinaryNinja::Architecture
std::string m_nameForRegister
 

Constructor & Destructor Documentation

◆ CoreArchitecture()

CoreArchitecture::CoreArchitecture ( BNArchitecture *  arch)

Member Function Documentation

◆ AlwaysBranch()

bool CoreArchitecture::AlwaysBranch ( uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

AlwaysBranch converts the conditional branch instruction at addr to an unconditional branch.

This is called when the right-click context menu item "always branch" is selected in the UI.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ Assemble()

bool CoreArchitecture::Assemble ( const std::string &  code,
uint64_t  addr,
DataBuffer result,
std::string &  errors 
)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ CanAssemble()

bool CoreArchitecture::CanAssemble ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ ConvertToNop()

bool CoreArchitecture::ConvertToNop ( uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

ConvertToNop converts the instruction at addr to a no-operation instruction.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ GetAddressSize()

size_t CoreArchitecture::GetAddressSize ( ) const
overridevirtual

◆ GetAllFlags()

vector< uint32_t > CoreArchitecture::GetAllFlags ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAllFlagWriteTypes()

vector< uint32_t > CoreArchitecture::GetAllFlagWriteTypes ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAllIntrinsics()

vector< uint32_t > CoreArchitecture::GetAllIntrinsics ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAllRegisters()

vector< uint32_t > CoreArchitecture::GetAllRegisters ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAllRegisterStacks()

vector< uint32_t > CoreArchitecture::GetAllRegisterStacks ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAllSemanticFlagClasses()

vector< uint32_t > CoreArchitecture::GetAllSemanticFlagClasses ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAllSemanticFlagGroups()

vector< uint32_t > CoreArchitecture::GetAllSemanticFlagGroups ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetAssociatedArchitectureByAddress()

Ref< Architecture > CoreArchitecture::GetAssociatedArchitectureByAddress ( uint64_t &  addr)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetDefaultIntegerSize()

size_t CoreArchitecture::GetDefaultIntegerSize ( ) const
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetEndianness()

BNEndianness CoreArchitecture::GetEndianness ( ) const
overridevirtual

◆ GetFlagConditionLowLevelIL()

ExprId CoreArchitecture::GetFlagConditionLowLevelIL ( BNLowLevelILFlagCondition  cond,
uint32_t  semClass,
LowLevelILFunction il 
)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagConditionsForSemanticFlagGroup()

map< uint32_t, BNLowLevelILFlagCondition > CoreArchitecture::GetFlagConditionsForSemanticFlagGroup ( uint32_t  semGroup)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagName()

string CoreArchitecture::GetFlagName ( uint32_t  flag)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagRole()

BNFlagRole CoreArchitecture::GetFlagRole ( uint32_t  flag,
uint32_t  semClass = 0 
)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagsRequiredForFlagCondition()

vector< uint32_t > CoreArchitecture::GetFlagsRequiredForFlagCondition ( BNLowLevelILFlagCondition  cond,
uint32_t  semClass = 0 
)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagsRequiredForSemanticFlagGroup()

vector< uint32_t > CoreArchitecture::GetFlagsRequiredForSemanticFlagGroup ( uint32_t  semGroup)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagsWrittenByFlagWriteType()

vector< uint32_t > CoreArchitecture::GetFlagsWrittenByFlagWriteType ( uint32_t  writeType)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagWriteLowLevelIL()

size_t CoreArchitecture::GetFlagWriteLowLevelIL ( BNLowLevelILOperation  op,
size_t  size,
uint32_t  flagWriteType,
uint32_t  flag,
BNRegisterOrConstant operands,
size_t  operandCount,
LowLevelILFunction il 
)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFlagWriteTypeName()

string CoreArchitecture::GetFlagWriteTypeName ( uint32_t  flags)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetFullWidthRegisters()

vector< uint32_t > CoreArchitecture::GetFullWidthRegisters ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetGlobalRegisters()

vector< uint32_t > CoreArchitecture::GetGlobalRegisters ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetInstructionAlignment()

size_t CoreArchitecture::GetInstructionAlignment ( ) const
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetInstructionInfo()

bool CoreArchitecture::GetInstructionInfo ( const uint8_t *  data,
uint64_t  addr,
size_t  maxLen,
InstructionInfo result 
)
overridevirtual

◆ GetInstructionLowLevelIL()

bool CoreArchitecture::GetInstructionLowLevelIL ( const uint8_t *  data,
uint64_t  addr,
size_t &  len,
LowLevelILFunction il 
)
overridevirtual

GetInstructionLowLevelIL Translates an instruction at addr and appends it onto the LowLevelILFunction& il.

Parameters
datapointer to the instruction data to be translated
addraddress of the instruction data to be translated
lenlength of the instruction data to be translated
ilthe LowLevelILFunction which

Reimplemented from BinaryNinja::Architecture.

◆ GetInstructionText()

bool CoreArchitecture::GetInstructionText ( const uint8_t *  data,
uint64_t  addr,
size_t &  len,
std::vector< InstructionTextToken > &  result 
)
overridevirtual

◆ GetIntrinsicInputs()

vector< NameAndType > CoreArchitecture::GetIntrinsicInputs ( uint32_t  intrinsic)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetIntrinsicName()

string CoreArchitecture::GetIntrinsicName ( uint32_t  intrinsic)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetIntrinsicOutputs()

vector< Confidence< Ref< Type > > > CoreArchitecture::GetIntrinsicOutputs ( uint32_t  intrinsic)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetLinkRegister()

uint32_t CoreArchitecture::GetLinkRegister ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetMaxInstructionLength()

size_t CoreArchitecture::GetMaxInstructionLength ( ) const
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetOpcodeDisplayLength()

size_t CoreArchitecture::GetOpcodeDisplayLength ( ) const
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetRegisterInfo()

BNRegisterInfo CoreArchitecture::GetRegisterInfo ( uint32_t  reg)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetRegisterName()

string CoreArchitecture::GetRegisterName ( uint32_t  reg)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetRegisterStackInfo()

BNRegisterStackInfo CoreArchitecture::GetRegisterStackInfo ( uint32_t  regStack)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetRegisterStackName()

string CoreArchitecture::GetRegisterStackName ( uint32_t  regStack)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetSemanticClassForFlagWriteType()

uint32_t CoreArchitecture::GetSemanticClassForFlagWriteType ( uint32_t  writeType)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetSemanticFlagClassName()

string CoreArchitecture::GetSemanticFlagClassName ( uint32_t  semClass)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetSemanticFlagGroupLowLevelIL()

ExprId CoreArchitecture::GetSemanticFlagGroupLowLevelIL ( uint32_t  semGroup,
LowLevelILFunction il 
)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetSemanticFlagGroupName()

string CoreArchitecture::GetSemanticFlagGroupName ( uint32_t  semGroup)
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetStackPointerRegister()

uint32_t CoreArchitecture::GetStackPointerRegister ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ GetSystemRegisters()

vector< uint32_t > CoreArchitecture::GetSystemRegisters ( )
overridevirtual

Reimplemented from BinaryNinja::Architecture.

◆ InvertBranch()

bool CoreArchitecture::InvertBranch ( uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

InvertBranch converts the conditional branch instruction at addr to its invert.

This is called when the right-click context menu item "invert branch" is selected in the UI.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ IsAlwaysBranchPatchAvailable()

bool CoreArchitecture::IsAlwaysBranchPatchAvailable ( const uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

IsAlwaysBranchPatchAvailable returns true if the instruction at addr can be patched to always branch.

This is used in the UI to determine if "always branch" should be displayed in the right-click context menu when right-clicking on an instruction.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ IsInvertBranchPatchAvailable()

bool CoreArchitecture::IsInvertBranchPatchAvailable ( const uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

IsInvertBranchPatchAvailable returns true if the instruction at addr can be patched to invert the branch.

This is used in the UI to determine if "invert branch" should be displayed in the right-click context menu when right-clicking on an instruction.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ IsNeverBranchPatchAvailable()

bool CoreArchitecture::IsNeverBranchPatchAvailable ( const uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

IsNeverBranchPatchAvailable returns true if the instruction at addr can be patched to never branch.

This is used in the UI to determine if "never branch" should be displayed in the right-click context menu when right-clicking on an instruction.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ IsSkipAndReturnValuePatchAvailable()

bool CoreArchitecture::IsSkipAndReturnValuePatchAvailable ( const uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

IsSkipAndReturnValuePatchAvailable returns true if the instruction at addr is a call that can be patched to return a value.

This is used in the UI to determine if "skip and return value" should be displayed in the right-click context menu when right-clicking on an instruction.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ IsSkipAndReturnZeroPatchAvailable()

bool CoreArchitecture::IsSkipAndReturnZeroPatchAvailable ( const uint8_t *  data,
uint64_t  addr,
size_t  len 
)
overridevirtual

IsSkipAndReturnZeroPatchAvailable returns true if the instruction at addr is a call that can be patched to return zero.

This is used in the UI to determine if "skip and return zero" should be displayed in the right-click context menu when right-clicking on an instruction.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.

◆ SkipAndReturnValue()

bool CoreArchitecture::SkipAndReturnValue ( uint8_t *  data,
uint64_t  addr,
size_t  len,
uint64_t  value 
)
overridevirtual

SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value.

This is called when the right-click context menu item "skip and return value" is selected in the UI.

Parameters
archthe architecture of the instruction
addrthe address of the instruction in question

Reimplemented from BinaryNinja::Architecture.


The documentation for this class was generated from the following files: