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 |
virtual BNEndianness | GetEndianness () const =0 |
virtual size_t | GetAddressSize () const =0 |
virtual size_t | GetDefaultIntegerSize () const |
virtual size_t | GetInstructionAlignment () const |
virtual size_t | GetMaxInstructionLength () const |
virtual size_t | GetOpcodeDisplayLength () const |
virtual Ref< Architecture > | GetAssociatedArchitectureByAddress (uint64_t &addr) |
virtual bool | GetInstructionInfo (const uint8_t *data, uint64_t addr, size_t maxLen, InstructionInfo &result)=0 |
virtual bool | GetInstructionText (const uint8_t *data, uint64_t addr, size_t &len, std::vector< InstructionTextToken > &result)=0 |
virtual bool | GetInstructionLowLevelIL (const uint8_t *data, uint64_t addr, size_t &len, LowLevelILFunction &il) |
GetInstructionLowLevelIL Translates an instruction at addr and appends it onto the LowLevelILFunction& il. More... | |
virtual std::string | GetRegisterName (uint32_t reg) |
virtual std::string | GetFlagName (uint32_t flag) |
virtual std::string | GetFlagWriteTypeName (uint32_t flags) |
virtual std::string | GetSemanticFlagClassName (uint32_t semClass) |
virtual std::string | GetSemanticFlagGroupName (uint32_t semGroup) |
virtual std::vector< uint32_t > | GetFullWidthRegisters () |
virtual std::vector< uint32_t > | GetAllRegisters () |
virtual std::vector< uint32_t > | GetAllFlags () |
virtual std::vector< uint32_t > | GetAllFlagWriteTypes () |
virtual std::vector< uint32_t > | GetAllSemanticFlagClasses () |
virtual std::vector< uint32_t > | GetAllSemanticFlagGroups () |
virtual BNFlagRole | GetFlagRole (uint32_t flag, uint32_t semClass=0) |
virtual std::vector< uint32_t > | GetFlagsRequiredForFlagCondition (BNLowLevelILFlagCondition cond, uint32_t semClass=0) |
virtual std::vector< uint32_t > | GetFlagsRequiredForSemanticFlagGroup (uint32_t semGroup) |
virtual std::map< uint32_t, 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) |
virtual uint32_t | GetStackPointerRegister () |
virtual uint32_t | GetLinkRegister () |
virtual std::vector< uint32_t > | GetGlobalRegisters () |
bool | IsGlobalRegister (uint32_t reg) |
virtual std::vector< uint32_t > | GetSystemRegisters () |
bool | IsSystemRegister (uint32_t reg) |
std::vector< uint32_t > | GetModifiedRegistersOnWrite (uint32_t reg) |
uint32_t | GetRegisterByName (const std::string &name) |
virtual std::string | GetRegisterStackName (uint32_t regStack) |
virtual std::vector< uint32_t > | GetAllRegisterStacks () |
virtual BNRegisterStackInfo | GetRegisterStackInfo (uint32_t regStack) |
uint32_t | GetRegisterStackForRegister (uint32_t reg) |
virtual std::string | GetIntrinsicName (uint32_t intrinsic) |
virtual std::vector< uint32_t > | GetAllIntrinsics () |
virtual std::vector< NameAndType > | GetIntrinsicInputs (uint32_t intrinsic) |
virtual std::vector< Confidence< Ref< Type > > > | GetIntrinsicOutputs (uint32_t intrinsic) |
virtual bool | CanAssemble () |
virtual bool | Assemble (const std::string &code, uint64_t addr, DataBuffer &result, std::string &errors) |
virtual bool | IsNeverBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
IsNeverBranchPatchAvailable returns true if the instruction at addr can be patched to never branch. More... | |
virtual bool | IsAlwaysBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
IsAlwaysBranchPatchAvailable returns true if the instruction at addr can be patched to always branch. More... | |
virtual bool | IsInvertBranchPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
IsInvertBranchPatchAvailable returns true if the instruction at addr can be patched to invert the branch. More... | |
virtual bool | IsSkipAndReturnZeroPatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
IsSkipAndReturnZeroPatchAvailable returns true if the instruction at addr is a call that can be patched to return zero. More... | |
virtual bool | IsSkipAndReturnValuePatchAvailable (const uint8_t *data, uint64_t addr, size_t len) |
IsSkipAndReturnValuePatchAvailable returns true if the instruction at addr is a call that can be patched to return a value. More... | |
virtual bool | ConvertToNop (uint8_t *data, uint64_t addr, size_t len) |
ConvertToNop converts the instruction at addr to a no-operation instruction. More... | |
virtual bool | AlwaysBranch (uint8_t *data, uint64_t addr, size_t len) |
AlwaysBranch converts the conditional branch instruction at addr to an unconditional branch. More... | |
virtual bool | InvertBranch (uint8_t *data, uint64_t addr, size_t len) |
InvertBranch converts the conditional branch instruction at addr to its invert. More... | |
virtual bool | SkipAndReturnValue (uint8_t *data, uint64_t addr, size_t len, uint64_t value) |
SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value. More... | |
void | RegisterFunctionRecognizer (FunctionRecognizer *recog) |
void | RegisterRelocationHandler (const std::string &viewName, RelocationHandler *handler) |
Ref< 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) |
std::vector< Ref< CallingConvention > > | GetCallingConventions () |
Ref< CallingConvention > | GetCallingConventionByName (const std::string &name) |
void | SetDefaultCallingConvention (CallingConvention *cc) |
void | SetCdeclCallingConvention (CallingConvention *cc) |
void | SetStdcallCallingConvention (CallingConvention *cc) |
void | SetFastcallCallingConvention (CallingConvention *cc) |
Ref< CallingConvention > | GetDefaultCallingConvention () |
Ref< CallingConvention > | GetCdeclCallingConvention () |
Ref< CallingConvention > | GetStdcallCallingConvention () |
Ref< CallingConvention > | GetFastcallCallingConvention () |
Ref< Platform > | GetStandalonePlatform () |
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 () |
Static Public Member Functions | |
static void | Register (Architecture *arch) |
static Ref< Architecture > | GetByName (const std::string &name) |
static std::vector< Ref< Architecture > > | GetList () |
Static Public Member Functions inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture > | |
static BNArchitecture * | GetObject (StaticCoreRefCountObject *obj) |
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 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) |
static uint32_t * | GetFlagsWrittenByFlagWriteTypeCallback (void *ctxt, uint32_t writeType, size_t *count) |
static uint32_t | GetSemanticClassForFlagWriteTypeCallback (void *ctxt, uint32_t writeType) |
static size_t | GetFlagWriteLowLevelILCallback (void *ctxt, BNLowLevelILOperation op, size_t size, uint32_t flagWriteType, uint32_t flag, BNRegisterOrConstant *operands, size_t operandCount, BNLowLevelILFunction *il) |
static size_t | GetFlagConditionLowLevelILCallback (void *ctxt, BNLowLevelILFlagCondition cond, uint32_t semClass, BNLowLevelILFunction *il) |
static size_t | GetSemanticFlagGroupLowLevelILCallback (void *ctxt, uint32_t semGroup, BNLowLevelILFunction *il) |
static void | FreeRegisterListCallback (void *ctxt, uint32_t *regs) |
static void | GetRegisterInfoCallback (void *ctxt, uint32_t reg, BNRegisterInfo *result) |
static uint32_t | GetStackPointerRegisterCallback (void *ctxt) |
static uint32_t | GetLinkRegisterCallback (void *ctxt) |
static uint32_t * | GetGlobalRegistersCallback (void *ctxt, size_t *count) |
static uint32_t * | GetSystemRegistersCallback (void *ctxt, size_t *count) |
static char * | GetRegisterStackNameCallback (void *ctxt, uint32_t regStack) |
static uint32_t * | GetAllRegisterStacksCallback (void *ctxt, size_t *count) |
static void | GetRegisterStackInfoCallback (void *ctxt, uint32_t regStack, BNRegisterStackInfo *result) |
static char * | GetIntrinsicNameCallback (void *ctxt, uint32_t intrinsic) |
static uint32_t * | GetAllIntrinsicsCallback (void *ctxt, size_t *count) |
static 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 |
Additional Inherited Members | |
Public Attributes inherited from BinaryNinja::StaticCoreRefCountObject< BNArchitecture > | |
std::atomic< int > | m_refs |
BNArchitecture * | m_object |
|
protected |
BinaryNinja::Architecture::Architecture | ( | const std::string & | name | ) |
void Architecture::AddArchitectureRedirection | ( | Architecture * | from, |
Architecture * | to | ||
) |
|
virtual |
AlwaysBranch converts the conditional branch instruction at addr to an unconditional branch.
This is called when the right-click context menu item "always branch" is selected in the UI.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
ConvertToNop converts the instruction at addr to a no-operation instruction.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
pure virtual |
Implemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
uint64_t Architecture::GetBinaryViewTypeConstant | ( | const std::string & | type, |
const std::string & | name, | ||
uint64_t | defaultValue = 0 |
||
) |
|
static |
Ref< CallingConvention > Architecture::GetCallingConventionByName | ( | const std::string & | name | ) |
vector< Ref< CallingConvention > > Architecture::GetCallingConventions | ( | ) |
Ref< CallingConvention > Architecture::GetCdeclCallingConvention | ( | ) |
Ref< CallingConvention > Architecture::GetDefaultCallingConvention | ( | ) |
ExprId Architecture::GetDefaultFlagConditionLowLevelIL | ( | BNLowLevelILFlagCondition | cond, |
uint32_t | semClass, | ||
LowLevelILFunction & | il | ||
) |
size_t Architecture::GetDefaultFlagWriteLowLevelIL | ( | BNLowLevelILOperation | op, |
size_t | size, | ||
BNFlagRole | role, | ||
BNRegisterOrConstant * | operands, | ||
size_t | operandCount, | ||
LowLevelILFunction & | il | ||
) |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
pure virtual |
Implemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
Ref< CallingConvention > Architecture::GetFastcallCallingConvention | ( | ) |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
pure virtual |
Implemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
GetInstructionLowLevelIL Translates an instruction at addr and appends it onto the LowLevelILFunction& il.
data | pointer to the instruction data to be translated |
addr | address of the instruction data to be translated |
len | length of the instruction data to be translated |
il | the LowLevelILFunction which |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
pure virtual |
Implemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
static |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
vector< uint32_t > Architecture::GetModifiedRegistersOnWrite | ( | uint32_t | reg | ) |
string Architecture::GetName | ( | ) | const |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
uint32_t Architecture::GetRegisterByName | ( | const std::string & | name | ) |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
uint32_t Architecture::GetRegisterStackForRegister | ( | uint32_t | reg | ) |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
Ref< RelocationHandler > Architecture::GetRelocationHandler | ( | const std::string & | viewName | ) |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
Ref< CallingConvention > Architecture::GetStdcallCallingConvention | ( | ) |
|
virtual |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
staticprotected |
|
virtual |
InvertBranch converts the conditional branch instruction at addr to its invert.
This is called when the right-click context menu item "invert branch" is selected in the UI.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
IsAlwaysBranchPatchAvailable returns true if the instruction at addr can be patched to always branch.
This is used in the UI to determine if "always branch" should be displayed in the right-click context menu when right-clicking on an instruction.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
bool Architecture::IsBinaryViewTypeConstantDefined | ( | const std::string & | type, |
const std::string & | name | ||
) |
bool Architecture::IsGlobalRegister | ( | uint32_t | reg | ) |
|
virtual |
IsInvertBranchPatchAvailable returns true if the instruction at addr can be patched to invert the branch.
This is used in the UI to determine if "invert branch" should be displayed in the right-click context menu when right-clicking on an instruction.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
IsNeverBranchPatchAvailable returns true if the instruction at addr can be patched to never branch.
This is used in the UI to determine if "never branch" should be displayed in the right-click context menu when right-clicking on an instruction.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
IsSkipAndReturnValuePatchAvailable returns true if the instruction at addr is a call that can be patched to return a value.
This is used in the UI to determine if "skip and return value" should be displayed in the right-click context menu when right-clicking on an instruction.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
virtual |
IsSkipAndReturnZeroPatchAvailable returns true if the instruction at addr is a call that can be patched to return zero.
This is used in the UI to determine if "skip and return zero" should be displayed in the right-click context menu when right-clicking on an instruction.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
bool Architecture::IsSystemRegister | ( | uint32_t | reg | ) |
|
static |
|
protectedvirtual |
Reimplemented in BinaryNinja::ArchitectureExtension, and BinaryNinja::ArchitectureHook.
void Architecture::RegisterCallingConvention | ( | CallingConvention * | cc | ) |
void Architecture::RegisterFunctionRecognizer | ( | FunctionRecognizer * | recog | ) |
void Architecture::RegisterRelocationHandler | ( | const std::string & | viewName, |
RelocationHandler * | handler | ||
) |
void Architecture::SetBinaryViewTypeConstant | ( | const std::string & | type, |
const std::string & | name, | ||
uint64_t | value | ||
) |
void Architecture::SetCdeclCallingConvention | ( | CallingConvention * | cc | ) |
void Architecture::SetDefaultCallingConvention | ( | CallingConvention * | cc | ) |
void Architecture::SetFastcallCallingConvention | ( | CallingConvention * | cc | ) |
void Architecture::SetStdcallCallingConvention | ( | CallingConvention * | cc | ) |
|
virtual |
SkipAndReturnValue converts the call instruction at addr to an instruction that simulates that call returning a value.
This is called when the right-click context menu item "skip and return value" is selected in the UI.
arch | the architecture of the instruction |
addr | the address of the instruction in question |
Reimplemented in BinaryNinja::CoreArchitecture, and BinaryNinja::ArchitectureExtension.
|
staticprotected |
|
protected |