Binary Ninja API C++: Architectures
Classes related to interacting with, hooking, and implementing Architectures. More...
Classes related to interacting with, hooking, and implementing Architectures.
Classes | |
| class | BinaryNinja::Architecture |
| The Architecture class is the base class for all CPU architectures. More... | |
| class | BinaryNinja::CoreArchitecture |
| class | BinaryNinja::ArchitectureExtension |
| class | BinaryNinja::ArchitectureHook |
◆ BinaryNinja::Architecture
class BinaryNinja::Architecture
The Architecture class is the base class for all CPU architectures.
This provides disassembly, assembly, patching, and IL translation lifting for a given architecture.
Public Member Functions | |
| Architecture (const std::string &name) | |
| std::string | GetName () const |
| Get the name of this architecture. | |
| virtual BNEndianness | GetEndianness () const =0 |
| Get the default endianness for this architecture. | |
| virtual size_t | GetAddressSize () const =0 |
| Get the address size for this architecture. | |
| virtual size_t | GetDefaultIntegerSize () const |
| Get the default integer size for this architecture. | |
| virtual size_t | GetInstructionAlignment () const |
| virtual size_t | GetMaxInstructionLength () const |
| Get the maximum instruction length. | |
| virtual size_t | GetOpcodeDisplayLength () const |
| virtual Ref< Architecture > | GetAssociatedArchitectureByAddress (uint64_t &addr) |
| virtual bool | GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result)=0 |
| Retrieves an InstructionInfo struct for the instruction at the given virtual address. | |
| virtual bool | GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result)=0 |
| Retrieves a list of InstructionTextTokens. | |
| virtual bool | GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il) |
| Translates an instruction at addr and appends it onto the LowLevelILFunction& il. | |
| virtual void | AnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) |
| Analyze the basic blocks of a function. | |
| virtual std::string | GetRegisterName (uint32_t reg) |
| Gets a register name from a register index. | |
| virtual std::string | GetFlagName (uint32_t flag) |
| Gets a flag name from a flag index. | |
| virtual std::string | GetFlagWriteTypeName (uint32_t flags) |
| Gets the flag write type name for the given flag. | |
| virtual std::string | GetSemanticFlagClassName (uint32_t semClass) |
| Gets the name of a semantic flag class from the index. | |
| virtual std::string | GetSemanticFlagGroupName (uint32_t semGroup) |
| Gets the name of a semantic flag group from the index. | |
| virtual std::vector< uint32_t > | GetFullWidthRegisters () |
| Get the list of full width register indices. | |
| virtual std::vector< uint32_t > | GetAllRegisters () |
| Get the list of all register indices. | |
| virtual std::vector< uint32_t > | GetAllFlags () |
| Get the list of all flag indices. | |
| virtual std::vector< uint32_t > | GetAllFlagWriteTypes () |
| Get the list of all flag write type indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagClasses () |
| Get the list of all semantic flag class indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagGroups () |
| Get the list of all semantic flag group indices. | |
| virtual BNFlagRole | GetFlagRole (uint32_t flag, uint32_t semClass=0) |
| Get the role of a given flag. | |
| 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, BNLowLevelILFlagCondition > | GetFlagConditionsForSemanticFlagGroup (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) |
| Get the register info for a given register index. | |
| virtual uint32_t | GetStackPointerRegister () |
| Get the register index corresponding to the stack pointer (SP). | |
| virtual uint32_t | GetLinkRegister () |
| Get the register index corresponding to the link register (LR). | |
| virtual std::vector< uint32_t > | GetGlobalRegisters () |
| bool | IsGlobalRegister (uint32_t reg) |
| virtual std::vector< uint32_t > | GetSystemRegisters () |
| Get the list of system register indices. | |
| bool | IsSystemRegister (uint32_t reg) |
| Check whether a register is a system register. | |
| std::vector< uint32_t > | GetModifiedRegistersOnWrite (uint32_t reg) |
Returns a list of register indices that are modified when reg is written to. | |
| uint32_t | GetRegisterByName (const std::string &name) |
| Get a register index by its name. | |
| virtual std::string | GetRegisterStackName (uint32_t regStack) |
| Get a register stack name from a register stack number. | |
| virtual std::vector< uint32_t > | GetAllRegisterStacks () |
| virtual BNRegisterStackInfo | GetRegisterStackInfo (uint32_t regStack) |
| uint32_t | GetRegisterStackForRegister (uint32_t reg) |
| virtual BNIntrinsicClass | GetIntrinsicClass (uint32_t intrinsic) |
| virtual std::string | GetIntrinsicName (uint32_t intrinsic) |
| virtual std::vector< uint32_t > | GetAllIntrinsics () |
| virtual std::vector< NameAndType > | GetIntrinsicInputs (uint32_t intrinsic) |
| virtual std::vector< Confidence< Ref< Type > > > | GetIntrinsicOutputs (uint32_t intrinsic) |
| virtual bool | CanAssemble () |
| Check whether this architecture can assemble instructions. | |
| virtual bool | Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors) |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions. | |
| virtual bool | IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
Returns true if the instruction at addr can be patched to never branch. | |
| virtual bool | IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
| Returns true if the instruction at addr can be patched to always branch. | |
| virtual bool | IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
| Returns true if the instruction at addr can be patched to invert the branch. | |
| virtual bool | IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
| Checks if the instruction at addr is a call that can be patched to return zero. | |
| virtual bool | IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
| Checks if the instruction at addr is a call that can be patched to return a value. | |
| virtual bool | ConvertToNop (uint8_t *data, uint64_t addr, size_t len) |
| Converts the instruction at addr to a no-operation instruction. | |
| virtual bool | AlwaysBranch (uint8_t *data, uint64_t addr, size_t len) |
| Converts the conditional branch instruction at addr to an unconditional branch. | |
| virtual bool | InvertBranch (uint8_t *data, uint64_t addr, size_t len) |
| InvertBranch converts the conditional branch instruction at addr to its invert. | |
| 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. | |
| void | RegisterFunctionRecognizer (FunctionRecognizer *recog) |
| void | RegisterRelocationHandler (const std::string &viewName, RelocationHandler *handler) |
| Ref< RelocationHandler > | GetRelocationHandler (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) |
| Register a calling convention with this architecture. | |
| std::vector< Ref< CallingConvention > > | GetCallingConventions () |
| List of registered calling conventions. | |
| Ref< CallingConvention > | GetCallingConventionByName (const std::string &name) |
| Get a calling convention by name. | |
| void | SetDefaultCallingConvention (CallingConvention *cc) |
| Set the default calling convention. | |
| void | SetCdeclCallingConvention (CallingConvention *cc) |
| Set the cdecl calling convention. | |
| void | SetStdcallCallingConvention (CallingConvention *cc) |
| Set the stdcall calling convention. | |
| void | SetFastcallCallingConvention (CallingConvention *cc) |
| Set the fastcall calling convention. | |
| Ref< CallingConvention > | GetDefaultCallingConvention () |
| Get the default calling convention. | |
| Ref< CallingConvention > | GetCdeclCallingConvention () |
| Get the cdecl calling convention. | |
| Ref< CallingConvention > | GetStdcallCallingConvention () |
| Get the stdcall calling convention. | |
| Ref< CallingConvention > | GetFastcallCallingConvention () |
| Get the fastcall calling convention. | |
| Ref< Platform > | GetStandalonePlatform () |
| Get the Architecture standalone platform. | |
| std::vector< Ref< TypeLibrary > > | GetTypeLibraries () |
| 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 () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Static Public Member Functions | |
| static void | Register (Architecture *arch) |
| Register an architecture. | |
| static void | DefaultAnalyzeBasicBlocksCallback (BNFunction *function, BNBasicBlockAnalysisContext *context) |
| static void | DefaultAnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) |
| Default implementation of AnalyzeBasicBlocks. | |
| static Ref< Architecture > | GetByName (const std::string &name) |
| Get an Architecture by name. | |
| static std::vector< Ref< Architecture > > | GetList () |
| Get the list of registered Architectures. | |
Protected Member Functions | |
| Architecture (BNArchitecture *arch) | |
| virtual void | Register (BNCustomArchitecture *callbacks) |
Static Protected Member Functions | |
| 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 void | AnalyzeBasicBlocksCallback (void *ctxt, BNFunction *function, BNBasicBlockAnalysisContext *context) |
| 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 BNFlagConditionForSemanticClass * | GetFlagConditionsForSemanticFlagGroupCallback (void *ctxt, uint32_t semGroup, size_t *count) |
| static void | FreeFlagConditionsForSemanticFlagGroupCallback (void *ctxt, BNFlagConditionForSemanticClass *conditions, size_t count) |
| 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, size_t len) |
| 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 BNIntrinsicClass | GetIntrinsicClassCallback (void *ctxt, uint32_t intrinsic) |
| static char * | GetIntrinsicNameCallback (void *ctxt, uint32_t intrinsic) |
| static uint32_t * | GetAllIntrinsicsCallback (void *ctxt, size_t *count) |
| static BNNameAndType * | GetIntrinsicInputsCallback (void *ctxt, uint32_t intrinsic, size_t *count) |
| static void | FreeNameAndTypeListCallback (void *ctxt, BNNameAndType *nt, size_t count) |
| static BNTypeWithConfidence * | GetIntrinsicOutputsCallback (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 | |
| std::string | m_nameForRegister |
◆ Architecture() [1/2]
◆ Architecture() [2/2]
| BinaryNinja::Architecture::Architecture | ( | const std::string & | name | ) |
◆ InitCallback()
◆ GetEndiannessCallback()
|
staticprotected |
◆ GetAddressSizeCallback()
|
staticprotected |
◆ GetDefaultIntegerSizeCallback()
|
staticprotected |
◆ GetInstructionAlignmentCallback()
|
staticprotected |
◆ GetMaxInstructionLengthCallback()
|
staticprotected |
◆ GetOpcodeDisplayLengthCallback()
|
staticprotected |
◆ GetAssociatedArchitectureByAddressCallback()
|
staticprotected |
◆ GetInstructionInfoCallback()
|
staticprotected |
◆ GetInstructionTextCallback()
|
staticprotected |
◆ FreeInstructionTextCallback()
◆ GetInstructionLowLevelILCallback()
|
staticprotected |
◆ AnalyzeBasicBlocksCallback()
◆ GetRegisterNameCallback()
|
staticprotected |
◆ GetFlagNameCallback()
|
staticprotected |
◆ GetFlagWriteTypeNameCallback()
|
staticprotected |
◆ GetSemanticFlagClassNameCallback()
|
staticprotected |
◆ GetSemanticFlagGroupNameCallback()
|
staticprotected |
◆ GetFullWidthRegistersCallback()
|
staticprotected |
◆ GetAllRegistersCallback()
|
staticprotected |
◆ GetAllFlagsCallback()
|
staticprotected |
◆ GetAllFlagWriteTypesCallback()
|
staticprotected |
◆ GetAllSemanticFlagClassesCallback()
|
staticprotected |
◆ GetAllSemanticFlagGroupsCallback()
|
staticprotected |
◆ GetFlagRoleCallback()
|
staticprotected |
◆ GetFlagsRequiredForFlagConditionCallback()
|
staticprotected |
◆ GetFlagsRequiredForSemanticFlagGroupCallback()
|
staticprotected |
◆ GetFlagConditionsForSemanticFlagGroupCallback()
|
staticprotected |
◆ FreeFlagConditionsForSemanticFlagGroupCallback()
|
staticprotected |
◆ GetFlagsWrittenByFlagWriteTypeCallback()
|
staticprotected |
◆ GetSemanticClassForFlagWriteTypeCallback()
|
staticprotected |
◆ GetFlagWriteLowLevelILCallback()
◆ GetFlagConditionLowLevelILCallback()
◆ GetSemanticFlagGroupLowLevelILCallback()
|
staticprotected |
◆ FreeRegisterListCallback()
|
staticprotected |
◆ GetRegisterInfoCallback()
|
staticprotected |
◆ GetStackPointerRegisterCallback()
|
staticprotected |
◆ GetLinkRegisterCallback()
|
staticprotected |
◆ GetGlobalRegistersCallback()
|
staticprotected |
◆ GetSystemRegistersCallback()
|
staticprotected |
◆ GetRegisterStackNameCallback()
|
staticprotected |
◆ GetAllRegisterStacksCallback()
|
staticprotected |
◆ GetRegisterStackInfoCallback()
|
staticprotected |
◆ GetIntrinsicClassCallback()
|
staticprotected |
◆ GetIntrinsicNameCallback()
|
staticprotected |
◆ GetAllIntrinsicsCallback()
|
staticprotected |
◆ GetIntrinsicInputsCallback()
|
staticprotected |
◆ FreeNameAndTypeListCallback()
|
staticprotected |
◆ GetIntrinsicOutputsCallback()
|
staticprotected |
◆ FreeTypeListCallback()
|
staticprotected |
◆ CanAssembleCallback()
|
staticprotected |
◆ AssembleCallback()
|
staticprotected |
◆ IsNeverBranchPatchAvailableCallback()
|
staticprotected |
◆ IsAlwaysBranchPatchAvailableCallback()
|
staticprotected |
◆ IsInvertBranchPatchAvailableCallback()
|
staticprotected |
◆ IsSkipAndReturnZeroPatchAvailableCallback()
|
staticprotected |
◆ IsSkipAndReturnValuePatchAvailableCallback()
|
staticprotected |
◆ ConvertToNopCallback()
|
staticprotected |
◆ AlwaysBranchCallback()
|
staticprotected |
◆ InvertBranchCallback()
|
staticprotected |
◆ SkipAndReturnValueCallback()
|
staticprotected |
◆ Register() [1/2]
◆ Register() [2/2]
|
static |
Register an architecture.
- Parameters
-
arch Architecture to register
◆ DefaultAnalyzeBasicBlocksCallback()
◆ DefaultAnalyzeBasicBlocks()
Default implementation of AnalyzeBasicBlocks.
- Parameters
-
function Function to analyze context Context for the analysis
◆ GetByName()
|
static |
Get an Architecture by name.
- Parameters
-
name Name of the architecture
- Returns
- The architecture, if it was found.
◆ GetList()
|
static |
Get the list of registered Architectures.
- Returns
- The list of registered architectures
◆ GetName()
| string Architecture::GetName | ( | ) | const |
Get the name of this architecture.
- Returns
- The name of this architecture
◆ GetEndianness()
|
pure virtual |
Get the default endianness for this architecture.
- Returns
- The default endianness for this architecture
Implemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAddressSize()
|
pure virtual |
Get the address size for this architecture.
- Returns
- The address size for this architecture
Implemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetDefaultIntegerSize()
|
virtual |
Get the default integer size for this architecture.
- Returns
- The default integer size for this architecture
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetInstructionAlignment()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetMaxInstructionLength()
|
virtual |
Get the maximum instruction length.
- Returns
- The maximum instruction length
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetOpcodeDisplayLength()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAssociatedArchitectureByAddress()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetInstructionInfo()
|
pure virtual |
Retrieves an InstructionInfo struct for the instruction at the given virtual address.
- Note
- Architecture subclasses should implement this method.
- The instruction info object should always set the InstructionInfo.length to the instruction length, \ and the branches of the proper types should be added if the instruction is a branch.
If the instruction is a branch instruction architecture plugins should add a branch of the proper type:
| BNBranchType | Description |
|---|---|
| UnconditionalBranch | Branch will always be taken |
| FalseBranch | False branch condition |
| TrueBranch | True branch condition |
| CallDestination | Branch is a call instruction (Branch with Link) |
| FunctionReturn | Branch returns from a function |
| SystemCall | System call instruction |
| IndirectBranch | Branch destination is a memory address or register |
| UnresolvedBranch | Branch destination is an unknown address |
- Parameters
-
[in] data pointer to the instruction data to retrieve info for [in] addr address of the instruction data to retrieve info for [in] maxLen Maximum length of the instruction data to read [out] result Retrieved instruction info
- Returns
- Whether instruction info was successfully retrieved.
Implemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetInstructionText()
|
pure virtual |
Retrieves a list of InstructionTextTokens.
- Parameters
-
[in] data pointer to the instruction data to retrieve text for [in] addr address of the instruction data to retrieve text for [out] len will be written to with the length of the instruction data which was translated [out] result
- Returns
- Whether instruction info was successfully retrieved.
Implemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetInstructionLowLevelIL()
|
virtual |
Translates an instruction at addr and appends it onto the LowLevelILFunction& il.
- Note
- Architecture subclasses should implement this method.
- Parameters
-
[in] data pointer to the instruction data to be translated [in] addr address of the instruction data to be translated [out] len will be written to with the length of the instruction data which was translated [in,out] il the LowLevelILFunction to appended to.
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ AnalyzeBasicBlocks()
Analyze the basic blocks of a function.
- Parameters
-
function Function to analyze context Context for the analysis
Reimplemented in BinaryNinja::CoreArchitecture.
◆ GetRegisterName()
|
virtual |
Gets a register name from a register index.
- Parameters
- Returns
- The register name
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFlagName()
|
virtual |
Gets a flag name from a flag index.
- Parameters
- Returns
- Flag name
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFlagWriteTypeName()
|
virtual |
Gets the flag write type name for the given flag.
- Parameters
- Returns
- Flag name
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetSemanticFlagClassName()
|
virtual |
Gets the name of a semantic flag class from the index.
- Parameters
-
semClass Semantic class index
- Returns
- The name of the semantic flag class
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetSemanticFlagGroupName()
|
virtual |
Gets the name of a semantic flag group from the index.
- Parameters
-
semGroup Semantic flag group index
- Returns
- Semantic flag group name
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFullWidthRegisters()
|
virtual |
Get the list of full width register indices.
- Returns
- The list of full width register indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllRegisters()
|
virtual |
Get the list of all register indices.
- Returns
- The list of all register indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllFlags()
|
virtual |
Get the list of all flag indices.
- Returns
- The list of all flag indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllFlagWriteTypes()
|
virtual |
Get the list of all flag write type indices.
- Returns
- The list of all flag write type indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllSemanticFlagClasses()
|
virtual |
Get the list of all semantic flag class indices.
- Returns
- The list of all semantic flag class indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllSemanticFlagGroups()
|
virtual |
Get the list of all semantic flag group indices.
- Returns
- The list of all semantic flag group indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFlagRole()
|
virtual |
Get the role of a given flag.
- Parameters
-
flag Flag index semClass Optional semantic flag class
- Returns
- Flag role
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFlagsRequiredForFlagCondition()
◆ GetFlagsRequiredForSemanticFlagGroup()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFlagConditionsForSemanticFlagGroup()
◆ GetFlagsWrittenByFlagWriteType()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetSemanticClassForFlagWriteType()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetFlagWriteLowLevelIL()
◆ GetDefaultFlagWriteLowLevelIL()
◆ GetFlagConditionLowLevelIL()
◆ GetDefaultFlagConditionLowLevelIL()
◆ GetSemanticFlagGroupLowLevelIL()
◆ GetRegisterInfo()
Get the register info for a given register index.
- Parameters
- Returns
- Register info
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetStackPointerRegister()
|
virtual |
Get the register index corresponding to the stack pointer (SP).
- Returns
- The register index corresponding to the stack pointer
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetLinkRegister()
|
virtual |
Get the register index corresponding to the link register (LR).
- Returns
- The register index corresponding to the link register
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetGlobalRegisters()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsGlobalRegister()
| bool Architecture::IsGlobalRegister | ( | uint32_t | reg | ) |
◆ GetSystemRegisters()
|
virtual |
Get the list of system register indices.
- Returns
- The list of system register indices
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsSystemRegister()
| bool Architecture::IsSystemRegister | ( | uint32_t | reg | ) |
Check whether a register is a system register.
- Parameters
- Returns
- Whether a register is a system register
◆ GetModifiedRegistersOnWrite()
| vector< uint32_t > Architecture::GetModifiedRegistersOnWrite | ( | uint32_t | reg | ) |
Returns a list of register indices that are modified when reg is written to.
- Parameters
- Returns
- List of register indices modified on write.
◆ GetRegisterByName()
| uint32_t Architecture::GetRegisterByName | ( | const std::string & | name | ) |
Get a register index by its name.
- Parameters
- Returns
- Index of the register
◆ GetRegisterStackName()
|
virtual |
Get a register stack name from a register stack number.
- Parameters
-
regStack Register stack number
- Returns
- The corresponding register string
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllRegisterStacks()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetRegisterStackInfo()
◆ GetRegisterStackForRegister()
| uint32_t Architecture::GetRegisterStackForRegister | ( | uint32_t | reg | ) |
◆ GetIntrinsicClass()
◆ GetIntrinsicName()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetAllIntrinsics()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetIntrinsicInputs()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ GetIntrinsicOutputs()
|
virtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ CanAssemble()
|
virtual |
Check whether this architecture can assemble instructions.
- Returns
- Whether this architecture can assemble instructions
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ Assemble()
|
virtual |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions.
- Parameters
-
[in] code String representation of the instructions to be assembled [in] addr Address of the instructions [out] result DataBuffer containing the compiled bytes [out] errors Any errors that occurred during assembly
- Returns
- Whether assembly was successful
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsNeverBranchPatchAvailable()
|
virtual |
Returns true if the instruction at addr can be patched to never branch.
- Note
- 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
-
data Buffer of bytes to check addr the virtual address of the bytes, to be used when assembling len amount of bytes to be checked
- Returns
- If the never branch patch is available
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsAlwaysBranchPatchAvailable()
|
virtual |
Returns true if the instruction at addr can be patched to always branch.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the always branch patch is available
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsInvertBranchPatchAvailable()
|
virtual |
Returns true if the instruction at addr can be patched to invert the branch.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the invert branch patch is available
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsSkipAndReturnZeroPatchAvailable()
|
virtual |
Checks if the instruction at addr is a call that can be patched to return zero.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the skip and return zero patch is available
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ IsSkipAndReturnValuePatchAvailable()
|
virtual |
Checks if the instruction at addr is a call that can be patched to return a value.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the skip and return value patch is available
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ ConvertToNop()
|
virtual |
Converts the instruction at addr to a no-operation instruction.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ AlwaysBranch()
|
virtual |
Converts the conditional branch instruction at addr to an unconditional branch.
- Note
- This is called when the right-click context menu item "always branch" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ InvertBranch()
|
virtual |
InvertBranch converts the conditional branch instruction at addr to its invert.
- Note
- This is called when the right-click context menu item "invert branch" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ SkipAndReturnValue()
|
virtual |
SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value.
- Note
- This is called when the right-click context menu item "skip and return value" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted [in] value Value to be returned
- Returns
- Whether the conversion was successful
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::CoreArchitecture.
◆ RegisterFunctionRecognizer()
◆ RegisterRelocationHandler()
| void Architecture::RegisterRelocationHandler | ( | const std::string & | viewName, |
| RelocationHandler * | handler ) |
◆ GetRelocationHandler()
◆ IsBinaryViewTypeConstantDefined()
| bool Architecture::IsBinaryViewTypeConstantDefined | ( | const std::string & | type, |
| const std::string & | name ) |
- Deprecated
- This API has been deprecated. The implementation has been removed, and this function no longer has any effect
◆ GetBinaryViewTypeConstant()
| uint64_t Architecture::GetBinaryViewTypeConstant | ( | const std::string & | type, |
| const std::string & | name, | ||
| uint64_t | defaultValue = 0 ) |
- Deprecated
- This API has been deprecated. The implementation has been removed, and this function no longer has any effect
◆ SetBinaryViewTypeConstant()
| void Architecture::SetBinaryViewTypeConstant | ( | const std::string & | type, |
| const std::string & | name, | ||
| uint64_t | value ) |
- Deprecated
- This API has been deprecated. The implementation has been removed, and this function no longer has any effect
◆ RegisterCallingConvention()
Register a calling convention with this architecture.
- Parameters
-
cc calling convention to register
◆ GetCallingConventions()
List of registered calling conventions.
- Returns
- The list of registered calling conventions
◆ GetCallingConventionByName()
Get a calling convention by name.
- Parameters
-
name Name of the calling convention
- Returns
- The calling convention
◆ SetDefaultCallingConvention()
Set the default calling convention.
- Parameters
-
cc The default calling convention
◆ SetCdeclCallingConvention()
Set the cdecl calling convention.
- Parameters
-
cc The cdecl calling convention
◆ SetStdcallCallingConvention()
Set the stdcall calling convention.
- Parameters
-
cc The stdcall calling convention
◆ SetFastcallCallingConvention()
Set the fastcall calling convention.
- Parameters
-
cc The fastcall calling convention
◆ GetDefaultCallingConvention()
Get the default calling convention.
- Returns
- The default calling convention
◆ GetCdeclCallingConvention()
Get the cdecl calling convention.
- Returns
- The cdecl calling convention
◆ GetStdcallCallingConvention()
Get the stdcall calling convention.
- Returns
- The stdcall calling convention
◆ GetFastcallCallingConvention()
Get the fastcall calling convention.
- Returns
- The fastcall calling convention
◆ GetStandalonePlatform()
Get the Architecture standalone platform.
- Returns
- Architecture standalone platform
◆ GetTypeLibraries()
◆ AddArchitectureRedirection()
| void Architecture::AddArchitectureRedirection | ( | Architecture * | from, |
| Architecture * | to ) |
◆ m_nameForRegister
|
std::string BinaryNinja::Architecture::m_nameForRegister |
protected |
◆ BinaryNinja::CoreArchitecture
class BinaryNinja::CoreArchitecture
Public Member Functions | |
| CoreArchitecture (BNArchitecture *arch) | |
| virtual BNEndianness | GetEndianness () const override |
| Get the default endianness for this architecture. | |
| virtual size_t | GetAddressSize () const override |
| Get the address size for this architecture. | |
| virtual size_t | GetDefaultIntegerSize () const override |
| Get the default integer size for this architecture. | |
| virtual size_t | GetInstructionAlignment () const override |
| virtual size_t | GetMaxInstructionLength () const override |
| Get the maximum instruction length. | |
| virtual size_t | GetOpcodeDisplayLength () const override |
| virtual Ref< Architecture > | GetAssociatedArchitectureByAddress (uint64_t &addr) override |
| virtual bool | GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result) override |
| Retrieves an InstructionInfo struct for the instruction at the given virtual address. | |
| virtual bool | GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result) override |
| Retrieves a list of InstructionTextTokens. | |
| virtual bool | GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il) override |
| Translates an instruction at addr and appends it onto the LowLevelILFunction& il. | |
| virtual void | AnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) override |
| Analyze the basic blocks of a function. | |
| virtual std::string | GetRegisterName (uint32_t reg) override |
| Gets a register name from a register index. | |
| virtual std::string | GetFlagName (uint32_t flag) override |
| Gets a flag name from a flag index. | |
| virtual std::string | GetFlagWriteTypeName (uint32_t flags) override |
| Gets the flag write type name for the given flag. | |
| virtual std::string | GetSemanticFlagClassName (uint32_t semClass) override |
| Gets the name of a semantic flag class from the index. | |
| virtual std::string | GetSemanticFlagGroupName (uint32_t semGroup) override |
| Gets the name of a semantic flag group from the index. | |
| virtual std::vector< uint32_t > | GetFullWidthRegisters () override |
| Get the list of full width register indices. | |
| virtual std::vector< uint32_t > | GetAllRegisters () override |
| Get the list of all register indices. | |
| virtual std::vector< uint32_t > | GetAllFlags () override |
| Get the list of all flag indices. | |
| virtual std::vector< uint32_t > | GetAllFlagWriteTypes () override |
| Get the list of all flag write type indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagClasses () override |
| Get the list of all semantic flag class indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagGroups () override |
| Get the list of all semantic flag group indices. | |
| virtual BNFlagRole | GetFlagRole (uint32_t flag, uint32_t semClass=0) override |
| Get the role of a given flag. | |
| 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, BNLowLevelILFlagCondition > | GetFlagConditionsForSemanticFlagGroup (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 |
| Get the register info for a given register index. | |
| virtual uint32_t | GetStackPointerRegister () override |
| Get the register index corresponding to the stack pointer (SP). | |
| virtual uint32_t | GetLinkRegister () override |
| Get the register index corresponding to the link register (LR). | |
| virtual std::vector< uint32_t > | GetGlobalRegisters () override |
| virtual std::vector< uint32_t > | GetSystemRegisters () override |
| Get the list of system register indices. | |
| virtual std::string | GetRegisterStackName (uint32_t regStack) override |
| Get a register stack name from a register stack number. | |
| virtual std::vector< uint32_t > | GetAllRegisterStacks () override |
| virtual BNRegisterStackInfo | GetRegisterStackInfo (uint32_t regStack) override |
| virtual BNIntrinsicClass | GetIntrinsicClass (uint32_t intrinsic) override |
| virtual std::string | GetIntrinsicName (uint32_t intrinsic) override |
| virtual std::vector< uint32_t > | GetAllIntrinsics () override |
| virtual std::vector< NameAndType > | GetIntrinsicInputs (uint32_t intrinsic) override |
| virtual std::vector< Confidence< Ref< Type > > > | GetIntrinsicOutputs (uint32_t intrinsic) override |
| virtual bool | CanAssemble () override |
| Check whether this architecture can assemble instructions. | |
| virtual bool | Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors) override |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions. | |
| virtual bool | IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
Returns true if the instruction at addr can be patched to never branch. | |
| virtual bool | IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Returns true if the instruction at addr can be patched to always branch. | |
| virtual bool | IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Returns true if the instruction at addr can be patched to invert the branch. | |
| virtual bool | IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Checks if the instruction at addr is a call that can be patched to return zero. | |
| virtual bool | IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Checks if the instruction at addr is a call that can be patched to return a value. | |
| virtual bool | ConvertToNop (uint8_t *data, uint64_t addr, size_t len) override |
| Converts the instruction at addr to a no-operation instruction. | |
| virtual bool | AlwaysBranch (uint8_t *data, uint64_t addr, size_t len) override |
| Converts the conditional branch instruction at addr to an unconditional branch. | |
| virtual bool | InvertBranch (uint8_t *data, uint64_t addr, size_t len) override |
| InvertBranch converts the conditional branch instruction at addr to its invert. | |
| 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. | |
| Public Member Functions inherited from BinaryNinja::Architecture | |
| Architecture (const std::string &name) | |
| std::string | GetName () const |
| Get the name of this architecture. | |
| ExprId | GetDefaultFlagWriteLowLevelIL (BNLowLevelILOperation op, size_t size, BNFlagRole role, BNRegisterOrConstant *operands, size_t operandCount, LowLevelILFunction &il) |
| ExprId | GetDefaultFlagConditionLowLevelIL (BNLowLevelILFlagCondition cond, uint32_t semClass, LowLevelILFunction &il) |
| bool | IsGlobalRegister (uint32_t reg) |
| bool | IsSystemRegister (uint32_t reg) |
| Check whether a register is a system register. | |
| std::vector< uint32_t > | GetModifiedRegistersOnWrite (uint32_t reg) |
Returns a list of register indices that are modified when reg is written to. | |
| uint32_t | GetRegisterByName (const std::string &name) |
| Get a register index by its name. | |
| uint32_t | GetRegisterStackForRegister (uint32_t reg) |
| void | RegisterFunctionRecognizer (FunctionRecognizer *recog) |
| void | RegisterRelocationHandler (const std::string &viewName, RelocationHandler *handler) |
| Ref< RelocationHandler > | GetRelocationHandler (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) |
| Register a calling convention with this architecture. | |
| std::vector< Ref< CallingConvention > > | GetCallingConventions () |
| List of registered calling conventions. | |
| Ref< CallingConvention > | GetCallingConventionByName (const std::string &name) |
| Get a calling convention by name. | |
| void | SetDefaultCallingConvention (CallingConvention *cc) |
| Set the default calling convention. | |
| void | SetCdeclCallingConvention (CallingConvention *cc) |
| Set the cdecl calling convention. | |
| void | SetStdcallCallingConvention (CallingConvention *cc) |
| Set the stdcall calling convention. | |
| void | SetFastcallCallingConvention (CallingConvention *cc) |
| Set the fastcall calling convention. | |
| Ref< CallingConvention > | GetDefaultCallingConvention () |
| Get the default calling convention. | |
| Ref< CallingConvention > | GetCdeclCallingConvention () |
| Get the cdecl calling convention. | |
| Ref< CallingConvention > | GetStdcallCallingConvention () |
| Get the stdcall calling convention. | |
| Ref< CallingConvention > | GetFastcallCallingConvention () |
| Get the fastcall calling convention. | |
| Ref< Platform > | GetStandalonePlatform () |
| Get the Architecture standalone platform. | |
| std::vector< Ref< TypeLibrary > > | GetTypeLibraries () |
| 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 () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Additional Inherited Members | |
| Static Public Member Functions inherited from BinaryNinja::Architecture | |
| static void | Register (Architecture *arch) |
| Register an architecture. | |
| static void | DefaultAnalyzeBasicBlocksCallback (BNFunction *function, BNBasicBlockAnalysisContext *context) |
| static void | DefaultAnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) |
| Default implementation of AnalyzeBasicBlocks. | |
| static Ref< Architecture > | GetByName (const std::string &name) |
| Get an Architecture by name. | |
| static std::vector< Ref< Architecture > > | GetList () |
| Get the list of registered Architectures. | |
| 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 void | AnalyzeBasicBlocksCallback (void *ctxt, BNFunction *function, BNBasicBlockAnalysisContext *context) |
| 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 BNFlagConditionForSemanticClass * | GetFlagConditionsForSemanticFlagGroupCallback (void *ctxt, uint32_t semGroup, size_t *count) |
| static void | FreeFlagConditionsForSemanticFlagGroupCallback (void *ctxt, BNFlagConditionForSemanticClass *conditions, size_t count) |
| 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, size_t len) |
| 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 BNIntrinsicClass | GetIntrinsicClassCallback (void *ctxt, uint32_t intrinsic) |
| static char * | GetIntrinsicNameCallback (void *ctxt, uint32_t intrinsic) |
| static uint32_t * | GetAllIntrinsicsCallback (void *ctxt, size_t *count) |
| static BNNameAndType * | GetIntrinsicInputsCallback (void *ctxt, uint32_t intrinsic, size_t *count) |
| static void | FreeNameAndTypeListCallback (void *ctxt, BNNameAndType *nt, size_t count) |
| static BNTypeWithConfidence * | GetIntrinsicOutputsCallback (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 |
◆ CoreArchitecture()
◆ GetEndianness()
|
overridevirtual |
Get the default endianness for this architecture.
- Returns
- The default endianness for this architecture
Implements BinaryNinja::Architecture.
◆ GetAddressSize()
|
overridevirtual |
Get the address size for this architecture.
- Returns
- The address size for this architecture
Implements BinaryNinja::Architecture.
◆ GetDefaultIntegerSize()
|
overridevirtual |
Get the default integer size for this architecture.
- Returns
- The default integer size for this architecture
Reimplemented from BinaryNinja::Architecture.
◆ GetInstructionAlignment()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetMaxInstructionLength()
|
overridevirtual |
Get the maximum instruction length.
- Returns
- The maximum instruction length
Reimplemented from BinaryNinja::Architecture.
◆ GetOpcodeDisplayLength()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetAssociatedArchitectureByAddress()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetInstructionInfo()
|
overridevirtual |
Retrieves an InstructionInfo struct for the instruction at the given virtual address.
- Note
- Architecture subclasses should implement this method.
- The instruction info object should always set the InstructionInfo.length to the instruction length, \ and the branches of the proper types should be added if the instruction is a branch.
If the instruction is a branch instruction architecture plugins should add a branch of the proper type:
| BNBranchType | Description |
|---|---|
| UnconditionalBranch | Branch will always be taken |
| FalseBranch | False branch condition |
| TrueBranch | True branch condition |
| CallDestination | Branch is a call instruction (Branch with Link) |
| FunctionReturn | Branch returns from a function |
| SystemCall | System call instruction |
| IndirectBranch | Branch destination is a memory address or register |
| UnresolvedBranch | Branch destination is an unknown address |
- Parameters
-
[in] data pointer to the instruction data to retrieve info for [in] addr address of the instruction data to retrieve info for [in] maxLen Maximum length of the instruction data to read [out] result Retrieved instruction info
- Returns
- Whether instruction info was successfully retrieved.
Implements BinaryNinja::Architecture.
◆ GetInstructionText()
|
overridevirtual |
Retrieves a list of InstructionTextTokens.
- Parameters
-
[in] data pointer to the instruction data to retrieve text for [in] addr address of the instruction data to retrieve text for [out] len will be written to with the length of the instruction data which was translated [out] result
- Returns
- Whether instruction info was successfully retrieved.
Implements BinaryNinja::Architecture.
◆ GetInstructionLowLevelIL()
|
overridevirtual |
Translates an instruction at addr and appends it onto the LowLevelILFunction& il.
- Note
- Architecture subclasses should implement this method.
- Parameters
-
[in] data pointer to the instruction data to be translated [in] addr address of the instruction data to be translated [out] len will be written to with the length of the instruction data which was translated [in,out] il the LowLevelILFunction to appended to.
Reimplemented from BinaryNinja::Architecture.
◆ AnalyzeBasicBlocks()
Analyze the basic blocks of a function.
- Parameters
-
function Function to analyze context Context for the analysis
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterName()
|
overridevirtual |
Gets a register name from a register index.
- Parameters
- Returns
- The register name
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagName()
|
overridevirtual |
Gets a flag name from a flag index.
- Parameters
- Returns
- Flag name
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagWriteTypeName()
|
overridevirtual |
Gets the flag write type name for the given flag.
- Parameters
- Returns
- Flag name
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticFlagClassName()
|
overridevirtual |
Gets the name of a semantic flag class from the index.
- Parameters
-
semClass Semantic class index
- Returns
- The name of the semantic flag class
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticFlagGroupName()
|
overridevirtual |
Gets the name of a semantic flag group from the index.
- Parameters
-
semGroup Semantic flag group index
- Returns
- Semantic flag group name
Reimplemented from BinaryNinja::Architecture.
◆ GetFullWidthRegisters()
|
overridevirtual |
Get the list of full width register indices.
- Returns
- The list of full width register indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllRegisters()
|
overridevirtual |
Get the list of all register indices.
- Returns
- The list of all register indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllFlags()
|
overridevirtual |
Get the list of all flag indices.
- Returns
- The list of all flag indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllFlagWriteTypes()
|
overridevirtual |
Get the list of all flag write type indices.
- Returns
- The list of all flag write type indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllSemanticFlagClasses()
|
overridevirtual |
Get the list of all semantic flag class indices.
- Returns
- The list of all semantic flag class indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllSemanticFlagGroups()
|
overridevirtual |
Get the list of all semantic flag group indices.
- Returns
- The list of all semantic flag group indices
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagRole()
|
overridevirtual |
Get the role of a given flag.
- Parameters
-
flag Flag index semClass Optional semantic flag class
- Returns
- Flag role
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagsRequiredForFlagCondition()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagsRequiredForSemanticFlagGroup()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagConditionsForSemanticFlagGroup()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagsWrittenByFlagWriteType()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticClassForFlagWriteType()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagWriteLowLevelIL()
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagConditionLowLevelIL()
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticFlagGroupLowLevelIL()
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterInfo()
|
overridevirtual |
Get the register info for a given register index.
- Parameters
- Returns
- Register info
Reimplemented from BinaryNinja::Architecture.
◆ GetStackPointerRegister()
|
overridevirtual |
Get the register index corresponding to the stack pointer (SP).
- Returns
- The register index corresponding to the stack pointer
Reimplemented from BinaryNinja::Architecture.
◆ GetLinkRegister()
|
overridevirtual |
Get the register index corresponding to the link register (LR).
- Returns
- The register index corresponding to the link register
Reimplemented from BinaryNinja::Architecture.
◆ GetGlobalRegisters()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetSystemRegisters()
|
overridevirtual |
Get the list of system register indices.
- Returns
- The list of system register indices
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterStackName()
|
overridevirtual |
Get a register stack name from a register stack number.
- Parameters
-
regStack Register stack number
- Returns
- The corresponding register string
Reimplemented from BinaryNinja::Architecture.
◆ GetAllRegisterStacks()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterStackInfo()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicClass()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicName()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetAllIntrinsics()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicInputs()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicOutputs()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ CanAssemble()
|
overridevirtual |
Check whether this architecture can assemble instructions.
- Returns
- Whether this architecture can assemble instructions
Reimplemented from BinaryNinja::Architecture.
◆ Assemble()
|
overridevirtual |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions.
- Parameters
-
[in] code String representation of the instructions to be assembled [in] addr Address of the instructions [out] result DataBuffer containing the compiled bytes [out] errors Any errors that occurred during assembly
- Returns
- Whether assembly was successful
Reimplemented from BinaryNinja::Architecture.
◆ IsNeverBranchPatchAvailable()
|
overridevirtual |
Returns true if the instruction at addr can be patched to never branch.
- Note
- 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
-
data Buffer of bytes to check addr the virtual address of the bytes, to be used when assembling len amount of bytes to be checked
- Returns
- If the never branch patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsAlwaysBranchPatchAvailable()
|
overridevirtual |
Returns true if the instruction at addr can be patched to always branch.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the always branch patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsInvertBranchPatchAvailable()
|
overridevirtual |
Returns true if the instruction at addr can be patched to invert the branch.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the invert branch patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsSkipAndReturnZeroPatchAvailable()
|
overridevirtual |
Checks if the instruction at addr is a call that can be patched to return zero.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the skip and return zero patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsSkipAndReturnValuePatchAvailable()
|
overridevirtual |
Checks if the instruction at addr is a call that can be patched to return a value.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the skip and return value patch is available
Reimplemented from BinaryNinja::Architecture.
◆ ConvertToNop()
|
overridevirtual |
Converts the instruction at addr to a no-operation instruction.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ AlwaysBranch()
|
overridevirtual |
Converts the conditional branch instruction at addr to an unconditional branch.
- Note
- This is called when the right-click context menu item "always branch" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ InvertBranch()
|
overridevirtual |
InvertBranch converts the conditional branch instruction at addr to its invert.
- Note
- This is called when the right-click context menu item "invert branch" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ SkipAndReturnValue()
|
overridevirtual |
SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value.
- Note
- This is called when the right-click context menu item "skip and return value" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted [in] value Value to be returned
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ BinaryNinja::ArchitectureExtension
class BinaryNinja::ArchitectureExtension
Public Member Functions | |
| ArchitectureExtension (const std::string &name, Architecture *base) | |
| Ref< Architecture > | GetBaseArchitecture () const |
| virtual BNEndianness | GetEndianness () const override |
| Get the default endianness for this architecture. | |
| virtual size_t | GetAddressSize () const override |
| Get the address size for this architecture. | |
| virtual size_t | GetDefaultIntegerSize () const override |
| Get the default integer size for this architecture. | |
| virtual size_t | GetInstructionAlignment () const override |
| virtual size_t | GetMaxInstructionLength () const override |
| Get the maximum instruction length. | |
| virtual size_t | GetOpcodeDisplayLength () const override |
| virtual Ref< Architecture > | GetAssociatedArchitectureByAddress (uint64_t &addr) override |
| virtual bool | GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result) override |
| Retrieves an InstructionInfo struct for the instruction at the given virtual address. | |
| virtual bool | GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result) override |
| Retrieves a list of InstructionTextTokens. | |
| virtual bool | GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il) override |
| Translates an instruction at addr and appends it onto the LowLevelILFunction& il. | |
| virtual std::string | GetRegisterName (uint32_t reg) override |
| Gets a register name from a register index. | |
| virtual std::string | GetFlagName (uint32_t flag) override |
| Gets a flag name from a flag index. | |
| virtual std::string | GetFlagWriteTypeName (uint32_t flags) override |
| Gets the flag write type name for the given flag. | |
| virtual std::string | GetSemanticFlagClassName (uint32_t semClass) override |
| Gets the name of a semantic flag class from the index. | |
| virtual std::string | GetSemanticFlagGroupName (uint32_t semGroup) override |
| Gets the name of a semantic flag group from the index. | |
| virtual std::vector< uint32_t > | GetFullWidthRegisters () override |
| Get the list of full width register indices. | |
| virtual std::vector< uint32_t > | GetAllRegisters () override |
| Get the list of all register indices. | |
| virtual std::vector< uint32_t > | GetAllFlags () override |
| Get the list of all flag indices. | |
| virtual std::vector< uint32_t > | GetAllFlagWriteTypes () override |
| Get the list of all flag write type indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagClasses () override |
| Get the list of all semantic flag class indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagGroups () override |
| Get the list of all semantic flag group indices. | |
| virtual BNFlagRole | GetFlagRole (uint32_t flag, uint32_t semClass=0) override |
| Get the role of a given flag. | |
| 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, BNLowLevelILFlagCondition > | GetFlagConditionsForSemanticFlagGroup (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 |
| Get the register info for a given register index. | |
| virtual uint32_t | GetStackPointerRegister () override |
| Get the register index corresponding to the stack pointer (SP). | |
| virtual uint32_t | GetLinkRegister () override |
| Get the register index corresponding to the link register (LR). | |
| virtual std::vector< uint32_t > | GetGlobalRegisters () override |
| virtual std::vector< uint32_t > | GetSystemRegisters () override |
| Get the list of system register indices. | |
| virtual std::string | GetRegisterStackName (uint32_t regStack) override |
| Get a register stack name from a register stack number. | |
| virtual std::vector< uint32_t > | GetAllRegisterStacks () override |
| virtual BNRegisterStackInfo | GetRegisterStackInfo (uint32_t regStack) override |
| virtual BNIntrinsicClass | GetIntrinsicClass (uint32_t intrinsic) override |
| virtual std::string | GetIntrinsicName (uint32_t intrinsic) override |
| virtual std::vector< uint32_t > | GetAllIntrinsics () override |
| virtual std::vector< NameAndType > | GetIntrinsicInputs (uint32_t intrinsic) override |
| virtual std::vector< Confidence< Ref< Type > > > | GetIntrinsicOutputs (uint32_t intrinsic) override |
| virtual bool | CanAssemble () override |
| Check whether this architecture can assemble instructions. | |
| virtual bool | Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors) override |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions. | |
| virtual bool | IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
Returns true if the instruction at addr can be patched to never branch. | |
| virtual bool | IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Returns true if the instruction at addr can be patched to always branch. | |
| virtual bool | IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Returns true if the instruction at addr can be patched to invert the branch. | |
| virtual bool | IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Checks if the instruction at addr is a call that can be patched to return zero. | |
| virtual bool | IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Checks if the instruction at addr is a call that can be patched to return a value. | |
| virtual bool | ConvertToNop (uint8_t *data, uint64_t addr, size_t len) override |
| Converts the instruction at addr to a no-operation instruction. | |
| virtual bool | AlwaysBranch (uint8_t *data, uint64_t addr, size_t len) override |
| Converts the conditional branch instruction at addr to an unconditional branch. | |
| virtual bool | InvertBranch (uint8_t *data, uint64_t addr, size_t len) override |
| InvertBranch converts the conditional branch instruction at addr to its invert. | |
| 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. | |
| Public Member Functions inherited from BinaryNinja::Architecture | |
| Architecture (const std::string &name) | |
| std::string | GetName () const |
| Get the name of this architecture. | |
| virtual void | AnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) |
| Analyze the basic blocks of a function. | |
| ExprId | GetDefaultFlagWriteLowLevelIL (BNLowLevelILOperation op, size_t size, BNFlagRole role, BNRegisterOrConstant *operands, size_t operandCount, LowLevelILFunction &il) |
| ExprId | GetDefaultFlagConditionLowLevelIL (BNLowLevelILFlagCondition cond, uint32_t semClass, LowLevelILFunction &il) |
| bool | IsGlobalRegister (uint32_t reg) |
| bool | IsSystemRegister (uint32_t reg) |
| Check whether a register is a system register. | |
| std::vector< uint32_t > | GetModifiedRegistersOnWrite (uint32_t reg) |
Returns a list of register indices that are modified when reg is written to. | |
| uint32_t | GetRegisterByName (const std::string &name) |
| Get a register index by its name. | |
| uint32_t | GetRegisterStackForRegister (uint32_t reg) |
| void | RegisterFunctionRecognizer (FunctionRecognizer *recog) |
| void | RegisterRelocationHandler (const std::string &viewName, RelocationHandler *handler) |
| Ref< RelocationHandler > | GetRelocationHandler (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) |
| Register a calling convention with this architecture. | |
| std::vector< Ref< CallingConvention > > | GetCallingConventions () |
| List of registered calling conventions. | |
| Ref< CallingConvention > | GetCallingConventionByName (const std::string &name) |
| Get a calling convention by name. | |
| void | SetDefaultCallingConvention (CallingConvention *cc) |
| Set the default calling convention. | |
| void | SetCdeclCallingConvention (CallingConvention *cc) |
| Set the cdecl calling convention. | |
| void | SetStdcallCallingConvention (CallingConvention *cc) |
| Set the stdcall calling convention. | |
| void | SetFastcallCallingConvention (CallingConvention *cc) |
| Set the fastcall calling convention. | |
| Ref< CallingConvention > | GetDefaultCallingConvention () |
| Get the default calling convention. | |
| Ref< CallingConvention > | GetCdeclCallingConvention () |
| Get the cdecl calling convention. | |
| Ref< CallingConvention > | GetStdcallCallingConvention () |
| Get the stdcall calling convention. | |
| Ref< CallingConvention > | GetFastcallCallingConvention () |
| Get the fastcall calling convention. | |
| Ref< Platform > | GetStandalonePlatform () |
| Get the Architecture standalone platform. | |
| std::vector< Ref< TypeLibrary > > | GetTypeLibraries () |
| 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 () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Protected Member Functions | |
| virtual void | Register (BNCustomArchitecture *callbacks) override |
| Protected Member Functions inherited from BinaryNinja::Architecture | |
| Architecture (BNArchitecture *arch) | |
Protected Attributes | |
| Ref< Architecture > | m_base |
| Protected Attributes inherited from BinaryNinja::Architecture | |
| std::string | m_nameForRegister |
Additional Inherited Members | |
| Static Public Member Functions inherited from BinaryNinja::Architecture | |
| static void | Register (Architecture *arch) |
| Register an architecture. | |
| static void | DefaultAnalyzeBasicBlocksCallback (BNFunction *function, BNBasicBlockAnalysisContext *context) |
| static void | DefaultAnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) |
| Default implementation of AnalyzeBasicBlocks. | |
| static Ref< Architecture > | GetByName (const std::string &name) |
| Get an Architecture by name. | |
| static std::vector< Ref< Architecture > > | GetList () |
| Get the list of registered Architectures. | |
| Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture > | |
| std::atomic< int > | m_refs |
| BNArchitecture * | m_object |
| 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 void | AnalyzeBasicBlocksCallback (void *ctxt, BNFunction *function, BNBasicBlockAnalysisContext *context) |
| 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 BNFlagConditionForSemanticClass * | GetFlagConditionsForSemanticFlagGroupCallback (void *ctxt, uint32_t semGroup, size_t *count) |
| static void | FreeFlagConditionsForSemanticFlagGroupCallback (void *ctxt, BNFlagConditionForSemanticClass *conditions, size_t count) |
| 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, size_t len) |
| 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 BNIntrinsicClass | GetIntrinsicClassCallback (void *ctxt, uint32_t intrinsic) |
| static char * | GetIntrinsicNameCallback (void *ctxt, uint32_t intrinsic) |
| static uint32_t * | GetAllIntrinsicsCallback (void *ctxt, size_t *count) |
| static BNNameAndType * | GetIntrinsicInputsCallback (void *ctxt, uint32_t intrinsic, size_t *count) |
| static void | FreeNameAndTypeListCallback (void *ctxt, BNNameAndType *nt, size_t count) |
| static BNTypeWithConfidence * | GetIntrinsicOutputsCallback (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) |
◆ ArchitectureExtension()
| ArchitectureExtension::ArchitectureExtension | ( | const std::string & | name, |
| Architecture * | base ) |
◆ Register()
Reimplemented from BinaryNinja::Architecture.
◆ GetBaseArchitecture()
|
inline |
◆ GetEndianness()
|
overridevirtual |
Get the default endianness for this architecture.
- Returns
- The default endianness for this architecture
Implements BinaryNinja::Architecture.
◆ GetAddressSize()
|
overridevirtual |
Get the address size for this architecture.
- Returns
- The address size for this architecture
Implements BinaryNinja::Architecture.
◆ GetDefaultIntegerSize()
|
overridevirtual |
Get the default integer size for this architecture.
- Returns
- The default integer size for this architecture
Reimplemented from BinaryNinja::Architecture.
◆ GetInstructionAlignment()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetMaxInstructionLength()
|
overridevirtual |
Get the maximum instruction length.
- Returns
- The maximum instruction length
Reimplemented from BinaryNinja::Architecture.
◆ GetOpcodeDisplayLength()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetAssociatedArchitectureByAddress()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetInstructionInfo()
|
overridevirtual |
Retrieves an InstructionInfo struct for the instruction at the given virtual address.
- Note
- Architecture subclasses should implement this method.
- The instruction info object should always set the InstructionInfo.length to the instruction length, \ and the branches of the proper types should be added if the instruction is a branch.
If the instruction is a branch instruction architecture plugins should add a branch of the proper type:
| BNBranchType | Description |
|---|---|
| UnconditionalBranch | Branch will always be taken |
| FalseBranch | False branch condition |
| TrueBranch | True branch condition |
| CallDestination | Branch is a call instruction (Branch with Link) |
| FunctionReturn | Branch returns from a function |
| SystemCall | System call instruction |
| IndirectBranch | Branch destination is a memory address or register |
| UnresolvedBranch | Branch destination is an unknown address |
- Parameters
-
[in] data pointer to the instruction data to retrieve info for [in] addr address of the instruction data to retrieve info for [in] maxLen Maximum length of the instruction data to read [out] result Retrieved instruction info
- Returns
- Whether instruction info was successfully retrieved.
Implements BinaryNinja::Architecture.
◆ GetInstructionText()
|
overridevirtual |
Retrieves a list of InstructionTextTokens.
- Parameters
-
[in] data pointer to the instruction data to retrieve text for [in] addr address of the instruction data to retrieve text for [out] len will be written to with the length of the instruction data which was translated [out] result
- Returns
- Whether instruction info was successfully retrieved.
Implements BinaryNinja::Architecture.
◆ GetInstructionLowLevelIL()
|
overridevirtual |
Translates an instruction at addr and appends it onto the LowLevelILFunction& il.
- Note
- Architecture subclasses should implement this method.
- Parameters
-
[in] data pointer to the instruction data to be translated [in] addr address of the instruction data to be translated [out] len will be written to with the length of the instruction data which was translated [in,out] il the LowLevelILFunction to appended to.
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterName()
|
overridevirtual |
Gets a register name from a register index.
- Parameters
- Returns
- The register name
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagName()
|
overridevirtual |
Gets a flag name from a flag index.
- Parameters
- Returns
- Flag name
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagWriteTypeName()
|
overridevirtual |
Gets the flag write type name for the given flag.
- Parameters
- Returns
- Flag name
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticFlagClassName()
|
overridevirtual |
Gets the name of a semantic flag class from the index.
- Parameters
-
semClass Semantic class index
- Returns
- The name of the semantic flag class
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticFlagGroupName()
|
overridevirtual |
Gets the name of a semantic flag group from the index.
- Parameters
-
semGroup Semantic flag group index
- Returns
- Semantic flag group name
Reimplemented from BinaryNinja::Architecture.
◆ GetFullWidthRegisters()
|
overridevirtual |
Get the list of full width register indices.
- Returns
- The list of full width register indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllRegisters()
|
overridevirtual |
Get the list of all register indices.
- Returns
- The list of all register indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllFlags()
|
overridevirtual |
Get the list of all flag indices.
- Returns
- The list of all flag indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllFlagWriteTypes()
|
overridevirtual |
Get the list of all flag write type indices.
- Returns
- The list of all flag write type indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllSemanticFlagClasses()
|
overridevirtual |
Get the list of all semantic flag class indices.
- Returns
- The list of all semantic flag class indices
Reimplemented from BinaryNinja::Architecture.
◆ GetAllSemanticFlagGroups()
|
overridevirtual |
Get the list of all semantic flag group indices.
- Returns
- The list of all semantic flag group indices
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagRole()
|
overridevirtual |
Get the role of a given flag.
- Parameters
-
flag Flag index semClass Optional semantic flag class
- Returns
- Flag role
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagsRequiredForFlagCondition()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagsRequiredForSemanticFlagGroup()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagConditionsForSemanticFlagGroup()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagsWrittenByFlagWriteType()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticClassForFlagWriteType()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagWriteLowLevelIL()
Reimplemented from BinaryNinja::Architecture.
◆ GetFlagConditionLowLevelIL()
Reimplemented from BinaryNinja::Architecture.
◆ GetSemanticFlagGroupLowLevelIL()
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterInfo()
|
overridevirtual |
Get the register info for a given register index.
- Parameters
- Returns
- Register info
Reimplemented from BinaryNinja::Architecture.
◆ GetStackPointerRegister()
|
overridevirtual |
Get the register index corresponding to the stack pointer (SP).
- Returns
- The register index corresponding to the stack pointer
Reimplemented from BinaryNinja::Architecture.
◆ GetLinkRegister()
|
overridevirtual |
Get the register index corresponding to the link register (LR).
- Returns
- The register index corresponding to the link register
Reimplemented from BinaryNinja::Architecture.
◆ GetGlobalRegisters()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetSystemRegisters()
|
overridevirtual |
Get the list of system register indices.
- Returns
- The list of system register indices
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterStackName()
|
overridevirtual |
Get a register stack name from a register stack number.
- Parameters
-
regStack Register stack number
- Returns
- The corresponding register string
Reimplemented from BinaryNinja::Architecture.
◆ GetAllRegisterStacks()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetRegisterStackInfo()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicClass()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicName()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetAllIntrinsics()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicInputs()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ GetIntrinsicOutputs()
|
overridevirtual |
Reimplemented from BinaryNinja::Architecture.
◆ CanAssemble()
|
overridevirtual |
Check whether this architecture can assemble instructions.
- Returns
- Whether this architecture can assemble instructions
Reimplemented from BinaryNinja::Architecture.
◆ Assemble()
|
overridevirtual |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions.
- Parameters
-
[in] code String representation of the instructions to be assembled [in] addr Address of the instructions [out] result DataBuffer containing the compiled bytes [out] errors Any errors that occurred during assembly
- Returns
- Whether assembly was successful
Reimplemented from BinaryNinja::Architecture.
◆ IsNeverBranchPatchAvailable()
|
overridevirtual |
Returns true if the instruction at addr can be patched to never branch.
- Note
- 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
-
data Buffer of bytes to check addr the virtual address of the bytes, to be used when assembling len amount of bytes to be checked
- Returns
- If the never branch patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsAlwaysBranchPatchAvailable()
|
overridevirtual |
Returns true if the instruction at addr can be patched to always branch.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the always branch patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsInvertBranchPatchAvailable()
|
overridevirtual |
Returns true if the instruction at addr can be patched to invert the branch.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the invert branch patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsSkipAndReturnZeroPatchAvailable()
|
overridevirtual |
Checks if the instruction at addr is a call that can be patched to return zero.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the skip and return zero patch is available
Reimplemented from BinaryNinja::Architecture.
◆ IsSkipAndReturnValuePatchAvailable()
|
overridevirtual |
Checks if the instruction at addr is a call that can be patched to return a value.
- Note
- 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
-
data Buffer of bytes to check addr the address of the instruction in question len amount of bytes to be checked
- Returns
- If the skip and return value patch is available
Reimplemented from BinaryNinja::Architecture.
◆ ConvertToNop()
|
overridevirtual |
Converts the instruction at addr to a no-operation instruction.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ AlwaysBranch()
|
overridevirtual |
Converts the conditional branch instruction at addr to an unconditional branch.
- Note
- This is called when the right-click context menu item "always branch" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ InvertBranch()
|
overridevirtual |
InvertBranch converts the conditional branch instruction at addr to its invert.
- Note
- This is called when the right-click context menu item "invert branch" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ SkipAndReturnValue()
|
overridevirtual |
SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value.
- Note
- This is called when the right-click context menu item "skip and return value" is selected in the UI.
- Parameters
-
[in,out] data Buffer of bytes to convert [in] addr the address of the instruction to be converted [in] len Length of the bytes to be converted [in] value Value to be returned
- Returns
- Whether the conversion was successful
Reimplemented from BinaryNinja::Architecture.
◆ m_base
|
Ref<Architecture> BinaryNinja::ArchitectureExtension::m_base |
protected |
◆ BinaryNinja::ArchitectureHook
class BinaryNinja::ArchitectureHook
Public Member Functions | |
| ArchitectureHook (Architecture *base) | |
| Public Member Functions inherited from BinaryNinja::CoreArchitecture | |
| CoreArchitecture (BNArchitecture *arch) | |
| virtual BNEndianness | GetEndianness () const override |
| Get the default endianness for this architecture. | |
| virtual size_t | GetAddressSize () const override |
| Get the address size for this architecture. | |
| virtual size_t | GetDefaultIntegerSize () const override |
| Get the default integer size for this architecture. | |
| virtual size_t | GetInstructionAlignment () const override |
| virtual size_t | GetMaxInstructionLength () const override |
| Get the maximum instruction length. | |
| virtual size_t | GetOpcodeDisplayLength () const override |
| virtual Ref< Architecture > | GetAssociatedArchitectureByAddress (uint64_t &addr) override |
| virtual bool | GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result) override |
| Retrieves an InstructionInfo struct for the instruction at the given virtual address. | |
| virtual bool | GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result) override |
| Retrieves a list of InstructionTextTokens. | |
| virtual bool | GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il) override |
| Translates an instruction at addr and appends it onto the LowLevelILFunction& il. | |
| virtual void | AnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) override |
| Analyze the basic blocks of a function. | |
| virtual std::string | GetRegisterName (uint32_t reg) override |
| Gets a register name from a register index. | |
| virtual std::string | GetFlagName (uint32_t flag) override |
| Gets a flag name from a flag index. | |
| virtual std::string | GetFlagWriteTypeName (uint32_t flags) override |
| Gets the flag write type name for the given flag. | |
| virtual std::string | GetSemanticFlagClassName (uint32_t semClass) override |
| Gets the name of a semantic flag class from the index. | |
| virtual std::string | GetSemanticFlagGroupName (uint32_t semGroup) override |
| Gets the name of a semantic flag group from the index. | |
| virtual std::vector< uint32_t > | GetFullWidthRegisters () override |
| Get the list of full width register indices. | |
| virtual std::vector< uint32_t > | GetAllRegisters () override |
| Get the list of all register indices. | |
| virtual std::vector< uint32_t > | GetAllFlags () override |
| Get the list of all flag indices. | |
| virtual std::vector< uint32_t > | GetAllFlagWriteTypes () override |
| Get the list of all flag write type indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagClasses () override |
| Get the list of all semantic flag class indices. | |
| virtual std::vector< uint32_t > | GetAllSemanticFlagGroups () override |
| Get the list of all semantic flag group indices. | |
| virtual BNFlagRole | GetFlagRole (uint32_t flag, uint32_t semClass=0) override |
| Get the role of a given flag. | |
| 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, BNLowLevelILFlagCondition > | GetFlagConditionsForSemanticFlagGroup (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 |
| Get the register info for a given register index. | |
| virtual uint32_t | GetStackPointerRegister () override |
| Get the register index corresponding to the stack pointer (SP). | |
| virtual uint32_t | GetLinkRegister () override |
| Get the register index corresponding to the link register (LR). | |
| virtual std::vector< uint32_t > | GetGlobalRegisters () override |
| virtual std::vector< uint32_t > | GetSystemRegisters () override |
| Get the list of system register indices. | |
| virtual std::string | GetRegisterStackName (uint32_t regStack) override |
| Get a register stack name from a register stack number. | |
| virtual std::vector< uint32_t > | GetAllRegisterStacks () override |
| virtual BNRegisterStackInfo | GetRegisterStackInfo (uint32_t regStack) override |
| virtual BNIntrinsicClass | GetIntrinsicClass (uint32_t intrinsic) override |
| virtual std::string | GetIntrinsicName (uint32_t intrinsic) override |
| virtual std::vector< uint32_t > | GetAllIntrinsics () override |
| virtual std::vector< NameAndType > | GetIntrinsicInputs (uint32_t intrinsic) override |
| virtual std::vector< Confidence< Ref< Type > > > | GetIntrinsicOutputs (uint32_t intrinsic) override |
| virtual bool | CanAssemble () override |
| Check whether this architecture can assemble instructions. | |
| virtual bool | Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors) override |
Converts the string of assembly instructions code loaded at virtual address addr to the byte representation of those instructions. | |
| virtual bool | IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
Returns true if the instruction at addr can be patched to never branch. | |
| virtual bool | IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Returns true if the instruction at addr can be patched to always branch. | |
| virtual bool | IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Returns true if the instruction at addr can be patched to invert the branch. | |
| virtual bool | IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Checks if the instruction at addr is a call that can be patched to return zero. | |
| virtual bool | IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len) override |
| Checks if the instruction at addr is a call that can be patched to return a value. | |
| virtual bool | ConvertToNop (uint8_t *data, uint64_t addr, size_t len) override |
| Converts the instruction at addr to a no-operation instruction. | |
| virtual bool | AlwaysBranch (uint8_t *data, uint64_t addr, size_t len) override |
| Converts the conditional branch instruction at addr to an unconditional branch. | |
| virtual bool | InvertBranch (uint8_t *data, uint64_t addr, size_t len) override |
| InvertBranch converts the conditional branch instruction at addr to its invert. | |
| 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. | |
| Public Member Functions inherited from BinaryNinja::Architecture | |
| Architecture (const std::string &name) | |
| std::string | GetName () const |
| Get the name of this architecture. | |
| ExprId | GetDefaultFlagWriteLowLevelIL (BNLowLevelILOperation op, size_t size, BNFlagRole role, BNRegisterOrConstant *operands, size_t operandCount, LowLevelILFunction &il) |
| ExprId | GetDefaultFlagConditionLowLevelIL (BNLowLevelILFlagCondition cond, uint32_t semClass, LowLevelILFunction &il) |
| bool | IsGlobalRegister (uint32_t reg) |
| bool | IsSystemRegister (uint32_t reg) |
| Check whether a register is a system register. | |
| std::vector< uint32_t > | GetModifiedRegistersOnWrite (uint32_t reg) |
Returns a list of register indices that are modified when reg is written to. | |
| uint32_t | GetRegisterByName (const std::string &name) |
| Get a register index by its name. | |
| uint32_t | GetRegisterStackForRegister (uint32_t reg) |
| void | RegisterFunctionRecognizer (FunctionRecognizer *recog) |
| void | RegisterRelocationHandler (const std::string &viewName, RelocationHandler *handler) |
| Ref< RelocationHandler > | GetRelocationHandler (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) |
| Register a calling convention with this architecture. | |
| std::vector< Ref< CallingConvention > > | GetCallingConventions () |
| List of registered calling conventions. | |
| Ref< CallingConvention > | GetCallingConventionByName (const std::string &name) |
| Get a calling convention by name. | |
| void | SetDefaultCallingConvention (CallingConvention *cc) |
| Set the default calling convention. | |
| void | SetCdeclCallingConvention (CallingConvention *cc) |
| Set the cdecl calling convention. | |
| void | SetStdcallCallingConvention (CallingConvention *cc) |
| Set the stdcall calling convention. | |
| void | SetFastcallCallingConvention (CallingConvention *cc) |
| Set the fastcall calling convention. | |
| Ref< CallingConvention > | GetDefaultCallingConvention () |
| Get the default calling convention. | |
| Ref< CallingConvention > | GetCdeclCallingConvention () |
| Get the cdecl calling convention. | |
| Ref< CallingConvention > | GetStdcallCallingConvention () |
| Get the stdcall calling convention. | |
| Ref< CallingConvention > | GetFastcallCallingConvention () |
| Get the fastcall calling convention. | |
| Ref< Platform > | GetStandalonePlatform () |
| Get the Architecture standalone platform. | |
| std::vector< Ref< TypeLibrary > > | GetTypeLibraries () |
| 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 () |
| void | AddRefForCallback () |
| void | ReleaseForCallback () |
Protected Member Functions | |
| virtual void | Register (BNCustomArchitecture *callbacks) override |
| Protected Member Functions inherited from BinaryNinja::Architecture | |
| Architecture (BNArchitecture *arch) | |
Protected Attributes | |
| Ref< Architecture > | m_base |
| Protected Attributes inherited from BinaryNinja::Architecture | |
| std::string | m_nameForRegister |
Additional Inherited Members | |
| Static Public Member Functions inherited from BinaryNinja::Architecture | |
| static void | Register (Architecture *arch) |
| Register an architecture. | |
| static void | DefaultAnalyzeBasicBlocksCallback (BNFunction *function, BNBasicBlockAnalysisContext *context) |
| static void | DefaultAnalyzeBasicBlocks (Function *function, BasicBlockAnalysisContext &context) |
| Default implementation of AnalyzeBasicBlocks. | |
| static Ref< Architecture > | GetByName (const std::string &name) |
| Get an Architecture by name. | |
| static std::vector< Ref< Architecture > > | GetList () |
| Get the list of registered Architectures. | |
| Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture > | |
| std::atomic< int > | m_refs |
| BNArchitecture * | m_object |
| 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 void | AnalyzeBasicBlocksCallback (void *ctxt, BNFunction *function, BNBasicBlockAnalysisContext *context) |
| 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 BNFlagConditionForSemanticClass * | GetFlagConditionsForSemanticFlagGroupCallback (void *ctxt, uint32_t semGroup, size_t *count) |
| static void | FreeFlagConditionsForSemanticFlagGroupCallback (void *ctxt, BNFlagConditionForSemanticClass *conditions, size_t count) |
| 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, size_t len) |
| 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 BNIntrinsicClass | GetIntrinsicClassCallback (void *ctxt, uint32_t intrinsic) |
| static char * | GetIntrinsicNameCallback (void *ctxt, uint32_t intrinsic) |
| static uint32_t * | GetAllIntrinsicsCallback (void *ctxt, size_t *count) |
| static BNNameAndType * | GetIntrinsicInputsCallback (void *ctxt, uint32_t intrinsic, size_t *count) |
| static void | FreeNameAndTypeListCallback (void *ctxt, BNNameAndType *nt, size_t count) |
| static BNTypeWithConfidence * | GetIntrinsicOutputsCallback (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) |
◆ ArchitectureHook()
| ArchitectureHook::ArchitectureHook | ( | Architecture * | base | ) |
◆ Register()
Reimplemented from BinaryNinja::Architecture.
◆ m_base
|
Ref<Architecture> BinaryNinja::ArchitectureHook::m_base |
protected |