Classes | |
class | BinaryNinja::Symbol |
class | BinaryNinja::Type |
class | BinaryNinja::TypeBuilder |
class | BinaryNinja::NamedTypeReference |
class | BinaryNinja::NamedTypeReferenceBuilder |
struct | BinaryNinja::StructureMember |
struct | BinaryNinja::InheritedStructureMember |
struct | BinaryNinja::BaseStructure |
class | BinaryNinja::Structure |
Structure is a class that wraps built structures and retrieves info about them. More... | |
class | BinaryNinja::StructureBuilder |
StructureBuilder is a convenience class used for building Structure Types. More... | |
struct | BinaryNinja::EnumerationMember |
class | BinaryNinja::Enumeration |
class | BinaryNinja::EnumerationBuilder |
EnumerationBuilder is a convenience class used for building Enumeration Types. More... | |
class BinaryNinja::Symbol |
Public Member Functions | |
Symbol (BNSymbolType type, const std::string &shortName, const std::string &fullName, const std::string &rawName, uint64_t addr, BNSymbolBinding binding=NoBinding, const NameSpace &nameSpace=NameSpace("BNINTERNALNAMESPACE"), uint64_t ordinal=0) | |
Symbol (BNSymbolType type, const std::string &name, uint64_t addr, BNSymbolBinding binding=NoBinding, const NameSpace &nameSpace=NameSpace("BNINTERNALNAMESPACE"), uint64_t ordinal=0) | |
Symbol (BNSymbol *sym) | |
BNSymbolType | GetType () const |
Symbols are defined as one of the following types: More... | |
BNSymbolBinding | GetBinding () const |
std::string | GetShortName () const |
std::string | GetFullName () const |
std::string | GetRawName () const |
uint64_t | GetAddress () const |
uint64_t | GetOrdinal () const |
bool | IsAutoDefined () const |
NameSpace | GetNameSpace () const |
![]() | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNSymbol * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Static Public Member Functions | |
static Ref< Symbol > | ImportedFunctionFromImportAddressSymbol (Symbol *sym, uint64_t addr) |
![]() | |
static BNSymbol * | GetObject (CoreRefCountObject *obj) |
static BNSymbol * | GetObject (const CoreRefCountObject *obj) |
Additional Inherited Members | |
![]() | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNSymbol * | m_object |
BinaryNinja::Symbol::Symbol | ( | BNSymbolType | type, |
const std::string & | shortName, | ||
const std::string & | fullName, | ||
const std::string & | rawName, | ||
uint64_t | addr, | ||
BNSymbolBinding | binding = NoBinding , |
||
const NameSpace & | nameSpace = NameSpace("BNINTERNALNAMESPACE") , |
||
uint64_t | ordinal = 0 |
||
) |
Symbol::Symbol | ( | BNSymbolType | type, |
const std::string & | name, | ||
uint64_t | addr, | ||
BNSymbolBinding | binding = NoBinding , |
||
const NameSpace & | nameSpace = NameSpace( "BNINTERNALNAMESPACE" ) , |
||
uint64_t | ordinal = 0 |
||
) |
Symbol::Symbol | ( | BNSymbol * | sym | ) |
BNSymbolType Symbol::GetType | ( | ) | const |
Symbols are defined as one of the following types:
=========================== ============================================================== BNSymbolType Description =========================== ============================================================== FunctionSymbol Symbol for function that exists in the current binary ImportAddressSymbol Symbol defined in the Import Address Table ImportedFunctionSymbol Symbol for a function that is not defined in the current binary DataSymbol Symbol for data in the current binary ImportedDataSymbol Symbol for data that is not defined in the current binary ExternalSymbol Symbols for data and code that reside outside the BinaryView LibraryFunctionSymbol Symbols for external functions outside the library =========================== ==============================================================
BNSymbolBinding Symbol::GetBinding | ( | ) | const |
string Symbol::GetShortName | ( | ) | const |
string Symbol::GetFullName | ( | ) | const |
string Symbol::GetRawName | ( | ) | const |
uint64_t Symbol::GetAddress | ( | ) | const |
uint64_t Symbol::GetOrdinal | ( | ) | const |
bool Symbol::IsAutoDefined | ( | ) | const |
class BinaryNinja::Type |
Public Member Functions | |
Type (BNType *type) | |
bool | operator== (const Type &other) |
bool | operator!= (const Type &other) |
BNTypeClass | GetClass () const |
Retrieve the Type Class for this Structure. More... | |
uint64_t | GetWidth () const |
Get the width in bytes of the Type. More... | |
size_t | GetAlignment () const |
QualifiedName | GetTypeName () const |
Get the QualifiedName for the Type. More... | |
Confidence< bool > | IsSigned () const |
Whether the type is signed. More... | |
Confidence< bool > | IsConst () const |
Whether the type is constant. More... | |
Confidence< bool > | IsVolatile () const |
bool | IsSystemCall () const |
Confidence< Ref< Type > > | GetChildType () const |
Get the child type for this Type if one exists. More... | |
Confidence< Ref< CallingConvention > > | GetCallingConvention () const |
For Function Types, get the calling convention. More... | |
std::vector< FunctionParameter > | GetParameters () const |
For Function Types, get a list of parameters. More... | |
Confidence< bool > | HasVariableArguments () const |
For Function Types, whether the Function has variadic arguments. More... | |
Confidence< bool > | CanReturn () const |
For Function Types, whether a function can return (is not marked noreturn) More... | |
Confidence< bool > | IsPure () const |
For Function Types, whether a function is pure (has no observable side-effects) More... | |
Ref< Structure > | GetStructure () const |
For Structure Types, the underlying Structure. More... | |
Ref< Enumeration > | GetEnumeration () const |
For Enumeration Types, the underlying Enumeration. More... | |
Ref< NamedTypeReference > | GetNamedTypeReference () const |
For NamedTypeReference Types, the underlying NamedTypeReference. More... | |
Confidence< BNMemberScope > | GetScope () const |
Confidence< int64_t > | GetStackAdjustment () const |
QualifiedName | GetStructureName () const |
Ref< NamedTypeReference > | GetRegisteredName () const |
uint32_t | GetSystemCallNumber () const |
BNIntegerDisplayType | GetIntegerTypeDisplayType () const |
uint64_t | GetElementCount () const |
uint64_t | GetOffset () const |
std::string | GetString (Platform *platform=nullptr, BNTokenEscapingType escaping=NoTokenEscapingType) const |
std::string | GetTypeAndName (const QualifiedName &name, BNTokenEscapingType escaping=NoTokenEscapingType) const |
std::string | GetStringBeforeName (Platform *platform=nullptr, BNTokenEscapingType escaping=NoTokenEscapingType) const |
std::string | GetStringAfterName (Platform *platform=nullptr, BNTokenEscapingType escaping=NoTokenEscapingType) const |
std::vector< InstructionTextToken > | GetTokens (Platform *platform=nullptr, uint8_t baseConfidence=255, BNTokenEscapingType escaping=NoTokenEscapingType) const |
std::vector< InstructionTextToken > | GetTokensBeforeName (Platform *platform=nullptr, uint8_t baseConfidence=255, BNTokenEscapingType escaping=NoTokenEscapingType) const |
std::vector< InstructionTextToken > | GetTokensAfterName (Platform *platform=nullptr, uint8_t baseConfidence=255, BNTokenEscapingType escaping=NoTokenEscapingType) const |
Ref< Type > | Duplicate () const |
Confidence< Ref< Type > > | WithConfidence (uint8_t conf) |
Get this type wrapped in a Confidence template. More... | |
bool | IsReferenceOfType (BNNamedTypeReferenceClass refType) |
If this Type is a NamedTypeReference, check whether it is reference to a specific Type. More... | |
bool | IsStructReference () |
If this Type is a NamedTypeReference, check whether it refers to a Struct Type. More... | |
bool | IsEnumReference () |
If this Type is a NamedTypeReference, check whether it refers to an Enum Type. More... | |
bool | IsUnionReference () |
If this Type is a NamedTypeReference, check whether it refers to a Union Type. More... | |
bool | IsClassReference () |
If this Type is a NamedTypeReference, check whether it refers to a Class Type. More... | |
bool | IsTypedefReference () |
If this Type is a NamedTypeReference, check whether it refers to a Typedef type. More... | |
bool | IsStructOrClassReference () |
If this Type is a NamedTypeReference, check whether it refers to a Struct or Class Type. More... | |
bool | IsVoid () const |
Check whether this type is a Void type. More... | |
bool | IsBool () const |
Check whether this type is a Boolean type. More... | |
bool | IsInteger () const |
Check whether this type is an Integer type. More... | |
bool | IsFloat () const |
Check whether this type is a Float type. More... | |
bool | IsStructure () const |
Check whether this type is a Structure type. More... | |
bool | IsEnumeration () const |
Check whether this type is an Enumeration type. More... | |
bool | IsPointer () const |
Check whether this type is a Pointer type. More... | |
bool | IsArray () const |
Check whether this type is an Array type. More... | |
bool | IsFunction () const |
Check whether this type is a Function type. More... | |
bool | IsVarArgs () const |
Check whether this type is a Variadic Arguments type. More... | |
bool | IsValue () const |
Check whether this type is a Value type. More... | |
bool | IsNamedTypeRefer () const |
Check whether this type is a Named Type Reference type. More... | |
bool | IsWideChar () const |
Check whether this type is a Wide Char type. More... | |
Ref< Type > | WithReplacedStructure (Structure *from, Structure *to) |
Ref< Type > | WithReplacedEnumeration (Enumeration *from, Enumeration *to) |
Ref< Type > | WithReplacedNamedTypeReference (NamedTypeReference *from, NamedTypeReference *to) |
bool | AddTypeMemberTokens (BinaryView *data, std::vector< InstructionTextToken > &tokens, int64_t offset, std::vector< std::string > &nameList, size_t size=0, bool indirect=false) |
std::vector< TypeDefinitionLine > | GetLines (Ref< BinaryView > data, const std::string &name, int lineWidth=80, bool collapsed=false, BNTokenEscapingType escaping=NoTokenEscapingType) |
![]() | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNType * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Static Public Member Functions | |
static Ref< Type > | VoidType () |
Create a "void" type. More... | |
static Ref< Type > | BoolType () |
Create a "bool" type. More... | |
static Ref< Type > | IntegerType (size_t width, const Confidence< bool > &sign, const std::string &altName="") |
Create a signed or unsigned integer with a set width. More... | |
static Ref< Type > | FloatType (size_t width, const std::string &altName="") |
Create a float or double Type with a specified width. More... | |
static Ref< Type > | WideCharType (size_t width, const std::string &altName="") |
static Ref< Type > | StructureType (Structure *strct) |
Create a Type object from a Structure object. More... | |
static Ref< Type > | NamedType (NamedTypeReference *ref, size_t width=0, size_t align=1, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0)) |
static Ref< Type > | NamedType (const QualifiedName &name, Type *type) |
static Ref< Type > | NamedType (const std::string &id, const QualifiedName &name, Type *type) |
static Ref< Type > | NamedType (BinaryView *view, const QualifiedName &name) |
static Ref< Type > | EnumerationType (Architecture *arch, Enumeration *enm, size_t width=0, const Confidence< bool > &isSigned=Confidence< bool >(false, 0)) |
static Ref< Type > | EnumerationType (Enumeration *enm, size_t width, const Confidence< bool > &isSigned=Confidence< bool >(false, 0)) |
static Ref< Type > | PointerType (Architecture *arch, const Confidence< Ref< Type > > &type, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0), BNReferenceType refType=PointerReferenceType) |
Create a Pointer type, which points to another Type. More... | |
static Ref< Type > | PointerType (size_t width, const Confidence< Ref< Type > > &type, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0), BNReferenceType refType=PointerReferenceType) |
Create a Pointer type, which points to another Type. More... | |
static Ref< Type > | ArrayType (const Confidence< Ref< Type > > &type, uint64_t elem) |
Create an Array Type. More... | |
static Ref< Type > | FunctionType (const Confidence< Ref< Type > > &returnValue, const Confidence< Ref< CallingConvention > > &callingConvention, const std::vector< FunctionParameter > ¶ms, const Confidence< bool > &varArg=Confidence< bool >(false, 0), const Confidence< int64_t > &stackAdjust=Confidence< int64_t >(0, 0)) |
Create a Function Type. More... | |
static Ref< Type > | FunctionType (const Confidence< Ref< Type > > &returnValue, const Confidence< Ref< CallingConvention > > &callingConvention, const std::vector< FunctionParameter > ¶ms, const Confidence< bool > &hasVariableArguments, const Confidence< bool > &canReturn, const Confidence< int64_t > &stackAdjust, const std::map< uint32_t, Confidence< int32_t > > ®StackAdjust=std::map< uint32_t, Confidence< int32_t > >(), const Confidence< std::vector< uint32_t > > &returnRegs=Confidence< std::vector< uint32_t > >(std::vector< uint32_t >(), 0), BNNameType ft=NoNameType, const Confidence< bool > &pure=Confidence< bool >(false, 0)) |
Create a Function Type. More... | |
static std::string | GenerateAutoTypeId (const std::string &source, const QualifiedName &name) |
static std::string | GenerateAutoDemangledTypeId (const QualifiedName &name) |
static std::string | GetAutoDemangledTypeIdSource () |
static std::string | GenerateAutoDebugTypeId (const QualifiedName &name) |
static std::string | GetAutoDebugTypeIdSource () |
static std::string | GetSizeSuffix (size_t size) |
![]() | |
static BNType * | GetObject (CoreRefCountObject *obj) |
static BNType * | GetObject (const CoreRefCountObject *obj) |
Additional Inherited Members | |
![]() | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNType * | m_object |
Type::Type | ( | BNType * | type | ) |
bool Type::operator== | ( | const Type & | other | ) |
bool Type::operator!= | ( | const Type & | other | ) |
BNTypeClass Type::GetClass | ( | ) | const |
uint64_t Type::GetWidth | ( | ) | const |
Get the width in bytes of the Type.
size_t Type::GetAlignment | ( | ) | const |
QualifiedName Type::GetTypeName | ( | ) | const |
Get the QualifiedName for the Type.
Confidence< bool > Type::IsSigned | ( | ) | const |
Whether the type is signed.
Confidence< bool > Type::IsConst | ( | ) | const |
Whether the type is constant.
Confidence< bool > Type::IsVolatile | ( | ) | const |
bool Type::IsSystemCall | ( | ) | const |
Confidence< Ref< Type > > Type::GetChildType | ( | ) | const |
Get the child type for this Type if one exists.
Confidence< Ref< CallingConvention > > Type::GetCallingConvention | ( | ) | const |
For Function Types, get the calling convention.
vector< FunctionParameter > Type::GetParameters | ( | ) | const |
For Function Types, get a list of parameters.
Confidence< bool > Type::HasVariableArguments | ( | ) | const |
Confidence< bool > Type::CanReturn | ( | ) | const |
For Function Types, whether a function can return (is not marked noreturn)
Confidence< bool > Type::IsPure | ( | ) | const |
For Function Types, whether a function is pure (has no observable side-effects)
Ref< Enumeration > Type::GetEnumeration | ( | ) | const |
For Enumeration Types, the underlying Enumeration.
Ref< NamedTypeReference > Type::GetNamedTypeReference | ( | ) | const |
For NamedTypeReference Types, the underlying NamedTypeReference.
Confidence< BNMemberScope > BinaryNinja::Type::GetScope | ( | ) | const |
Confidence< int64_t > Type::GetStackAdjustment | ( | ) | const |
QualifiedName Type::GetStructureName | ( | ) | const |
Ref< NamedTypeReference > Type::GetRegisteredName | ( | ) | const |
uint32_t Type::GetSystemCallNumber | ( | ) | const |
BNIntegerDisplayType Type::GetIntegerTypeDisplayType | ( | ) | const |
uint64_t Type::GetElementCount | ( | ) | const |
uint64_t Type::GetOffset | ( | ) | const |
string Type::GetString | ( | Platform * | platform = nullptr , |
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
string Type::GetTypeAndName | ( | const QualifiedName & | name, |
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
string Type::GetStringBeforeName | ( | Platform * | platform = nullptr , |
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
string Type::GetStringAfterName | ( | Platform * | platform = nullptr , |
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
vector< InstructionTextToken > Type::GetTokens | ( | Platform * | platform = nullptr , |
uint8_t | baseConfidence = 255 , |
||
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
vector< InstructionTextToken > Type::GetTokensBeforeName | ( | Platform * | platform = nullptr , |
uint8_t | baseConfidence = 255 , |
||
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
vector< InstructionTextToken > Type::GetTokensAfterName | ( | Platform * | platform = nullptr , |
uint8_t | baseConfidence = 255 , |
||
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) | const |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Create a Pointer type, which points to another Type.
arch | Architecture, used to calculate the proper pointer width |
type | Type that this Type points to |
cnst | Whether this type is const |
vltl | Whether this type is volatile |
refType | Reference Type, one of "PointerReferenceType", "ReferenceReferenceType", "RValueReferenceType", "NoReference" |
|
static |
Create a Pointer type, which points to another Type.
width | Width of the pointer in bytes |
type | Type that this type points to |
cnst | Whether this type is const |
vltl | Whether this type is volatile |
refType | Reference Type, one of "PointerReferenceType", "ReferenceReferenceType", "RValueReferenceType", "NoReference" |
|
static |
|
static |
returnValue | Return value Type |
callingConvention | Calling convention for the function |
params | list of FunctionParameter s |
varArg | Whether this function has variadic arguments, default false |
stackAdjust | Stack adjustment for this function, default 0 |
|
static |
returnValue | Return value Type |
callingConvention | Calling convention for the function |
params | list of FunctionParameters |
varArg | Whether this function has variadic arguments, default false |
stackAdjust | Stack adjustment for this function, default 0 |
regStackAdjust | Register stack adjustmemt |
returnRegs | Return registers |
|
static |
|
static |
|
static |
|
static |
|
static |
Confidence< Ref< Type > > Type::WithConfidence | ( | uint8_t | conf | ) |
Get this type wrapped in a Confidence template.
conf | Confidence value between 0 and 255 |
bool Type::IsReferenceOfType | ( | BNNamedTypeReferenceClass | refType | ) |
If this Type is a NamedTypeReference, check whether it is reference to a specific Type.
refType | BNNamedTypeReference to check it against |
|
inline |
If this Type is a NamedTypeReference, check whether it refers to a Struct Type.
|
inline |
If this Type is a NamedTypeReference, check whether it refers to an Enum Type.
|
inline |
If this Type is a NamedTypeReference, check whether it refers to a Union Type.
|
inline |
If this Type is a NamedTypeReference, check whether it refers to a Class Type.
|
inline |
If this Type is a NamedTypeReference, check whether it refers to a Typedef type.
|
inline |
If this Type is a NamedTypeReference, check whether it refers to a Struct or Class Type.
|
inline |
Check whether this type is a Void type.
|
inline |
Check whether this type is a Boolean type.
|
inline |
Check whether this type is an Integer type.
|
inline |
Check whether this type is a Float type.
|
inline |
Check whether this type is a Structure type.
|
inline |
Check whether this type is an Enumeration type.
|
inline |
Check whether this type is a Pointer type.
|
inline |
Check whether this type is an Array type.
|
inline |
Check whether this type is a Function type.
|
inline |
Check whether this type is a Variadic Arguments type.
|
inline |
Check whether this type is a Value type.
|
inline |
Check whether this type is a Named Type Reference type.
|
inline |
Check whether this type is a Wide Char type.
Ref< Type > Type::WithReplacedEnumeration | ( | Enumeration * | from, |
Enumeration * | to | ||
) |
Ref< Type > Type::WithReplacedNamedTypeReference | ( | NamedTypeReference * | from, |
NamedTypeReference * | to | ||
) |
bool Type::AddTypeMemberTokens | ( | BinaryView * | data, |
std::vector< InstructionTextToken > & | tokens, | ||
int64_t | offset, | ||
std::vector< std::string > & | nameList, | ||
size_t | size = 0 , |
||
bool | indirect = false |
||
) |
std::vector< TypeDefinitionLine > Type::GetLines | ( | Ref< BinaryView > | data, |
const std::string & | name, | ||
int | lineWidth = 80 , |
||
bool | collapsed = false , |
||
BNTokenEscapingType | escaping = NoTokenEscapingType |
||
) |
|
static |
class BinaryNinja::TypeBuilder |
Public Member Functions | |
TypeBuilder () | |
TypeBuilder (BNTypeBuilder *type) | |
TypeBuilder (const TypeBuilder &type) | |
TypeBuilder (TypeBuilder &&type) | |
TypeBuilder (Type *type) | |
TypeBuilder & | operator= (const TypeBuilder &type) |
TypeBuilder & | operator= (TypeBuilder &&type) |
TypeBuilder & | operator= (Type *type) |
Ref< Type > | Finalize () |
BNTypeClass | GetClass () const |
uint64_t | GetWidth () const |
size_t | GetAlignment () const |
QualifiedName | GetTypeName () const |
Confidence< bool > | IsSigned () const |
Confidence< bool > | IsConst () const |
Confidence< bool > | IsVolatile () const |
bool | IsSystemCall () const |
void | SetIntegerTypeDisplayType (BNIntegerDisplayType displayType) |
Confidence< Ref< Type > > | GetChildType () const |
Confidence< Ref< CallingConvention > > | GetCallingConvention () const |
std::vector< FunctionParameter > | GetParameters () const |
Confidence< bool > | HasVariableArguments () const |
Confidence< bool > | CanReturn () const |
Confidence< bool > | IsPure () const |
Ref< Structure > | GetStructure () const |
Ref< Enumeration > | GetEnumeration () const |
Ref< NamedTypeReference > | GetNamedTypeReference () const |
Confidence< BNMemberScope > | GetScope () const |
TypeBuilder & | SetNamedTypeReference (NamedTypeReference *ntr) |
TypeBuilder & | SetScope (const Confidence< BNMemberScope > &scope) |
TypeBuilder & | SetConst (const Confidence< bool > &cnst) |
TypeBuilder & | SetVolatile (const Confidence< bool > &vltl) |
TypeBuilder & | SetChildType (const Confidence< Ref< Type > > &child) |
TypeBuilder & | SetSigned (const Confidence< bool > &vltl) |
TypeBuilder & | SetTypeName (const QualifiedName &name) |
TypeBuilder & | SetAlternateName (const std::string &name) |
TypeBuilder & | SetSystemCall (bool sc, uint32_t n=0) |
Confidence< int64_t > | GetStackAdjustment () const |
QualifiedName | GetStructureName () const |
uint64_t | GetElementCount () const |
uint64_t | GetOffset () const |
uint32_t | GetSystemCallNumber () const |
TypeBuilder & | SetOffset (uint64_t offset) |
TypeBuilder & | SetFunctionCanReturn (const Confidence< bool > &canReturn) |
TypeBuilder & | SetPure (const Confidence< bool > &pure) |
TypeBuilder & | SetParameters (const std::vector< FunctionParameter > ¶ms) |
std::string | GetString (Platform *platform=nullptr) const |
std::string | GetTypeAndName (const QualifiedName &name) const |
std::string | GetStringBeforeName (Platform *platform=nullptr) const |
std::string | GetStringAfterName (Platform *platform=nullptr) const |
std::vector< InstructionTextToken > | GetTokens (Platform *platform=nullptr, uint8_t baseConfidence=255) const |
std::vector< InstructionTextToken > | GetTokensBeforeName (Platform *platform=nullptr, uint8_t baseConfidence=255) const |
std::vector< InstructionTextToken > | GetTokensAfterName (Platform *platform=nullptr, uint8_t baseConfidence=255) const |
bool | IsReferenceOfType (BNNamedTypeReferenceClass refType) |
bool | IsStructReference () |
bool | IsEnumReference () |
bool | IsUnionReference () |
bool | IsClassReference () |
bool | IsTypedefReference () |
bool | IsStructOrClassReference () |
bool | IsVoid () const |
bool | IsBool () const |
bool | IsInteger () const |
bool | IsFloat () const |
bool | IsStructure () const |
bool | IsEnumeration () const |
bool | IsPointer () const |
bool | IsArray () const |
bool | IsFunction () const |
bool | IsVarArgs () const |
bool | IsValue () const |
bool | IsNamedTypeRefer () const |
bool | IsWideChar () const |
Static Public Member Functions | |
static TypeBuilder | VoidType () |
static TypeBuilder | BoolType () |
static TypeBuilder | IntegerType (size_t width, const Confidence< bool > &sign, const std::string &altName="") |
static TypeBuilder | FloatType (size_t width, const std::string &typeName="") |
static TypeBuilder | WideCharType (size_t width, const std::string &typeName="") |
static TypeBuilder | StructureType (Structure *strct) |
static TypeBuilder | StructureType (StructureBuilder *strct) |
static TypeBuilder | NamedType (NamedTypeReference *ref, size_t width=0, size_t align=1, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0)) |
static TypeBuilder | NamedType (NamedTypeReferenceBuilder *ref, size_t width=0, size_t align=1, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0)) |
static TypeBuilder | NamedType (const QualifiedName &name, Type *type) |
static TypeBuilder | NamedType (const std::string &id, const QualifiedName &name, Type *type) |
static TypeBuilder | NamedType (BinaryView *view, const QualifiedName &name) |
static TypeBuilder | EnumerationType (Architecture *arch, Enumeration *enm, size_t width=0, const Confidence< bool > &issigned=Confidence< bool >(false, 0)) |
static TypeBuilder | EnumerationType (Architecture *arch, EnumerationBuilder *enm, size_t width=0, const Confidence< bool > &issigned=Confidence< bool >(false, 0)) |
static TypeBuilder | PointerType (Architecture *arch, const Confidence< Ref< Type > > &type, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0), BNReferenceType refType=PointerReferenceType) |
static TypeBuilder | PointerType (size_t width, const Confidence< Ref< Type > > &type, const Confidence< bool > &cnst=Confidence< bool >(false, 0), const Confidence< bool > &vltl=Confidence< bool >(false, 0), BNReferenceType refType=PointerReferenceType) |
static TypeBuilder | ArrayType (const Confidence< Ref< Type > > &type, uint64_t elem) |
static TypeBuilder | FunctionType (const Confidence< Ref< Type > > &returnValue, const Confidence< Ref< CallingConvention > > &callingConvention, const std::vector< FunctionParameter > ¶ms, const Confidence< bool > &varArg=Confidence< bool >(false, 0), const Confidence< int64_t > &stackAdjust=Confidence< int64_t >(0, 0)) |
static TypeBuilder | FunctionType (const Confidence< Ref< Type > > &returnValue, const Confidence< Ref< CallingConvention > > &callingConvention, const std::vector< FunctionParameter > ¶ms, const Confidence< bool > &hasVariableArguments, const Confidence< bool > &canReturn, const Confidence< int64_t > &stackAdjust, const std::map< uint32_t, Confidence< int32_t > > ®StackAdjust=std::map< uint32_t, Confidence< int32_t > >(), const Confidence< std::vector< uint32_t > > &returnRegs=Confidence< std::vector< uint32_t > >(std::vector< uint32_t >(), 0), BNNameType ft=NoNameType, const Confidence< bool > &pure=Confidence< bool >(false, 0)) |
TypeBuilder::TypeBuilder | ( | ) |
TypeBuilder::TypeBuilder | ( | BNTypeBuilder * | type | ) |
TypeBuilder::TypeBuilder | ( | const TypeBuilder & | type | ) |
TypeBuilder::TypeBuilder | ( | TypeBuilder && | type | ) |
TypeBuilder::TypeBuilder | ( | Type * | type | ) |
TypeBuilder & TypeBuilder::operator= | ( | const TypeBuilder & | type | ) |
TypeBuilder & TypeBuilder::operator= | ( | TypeBuilder && | type | ) |
TypeBuilder & TypeBuilder::operator= | ( | Type * | type | ) |
BNTypeClass TypeBuilder::GetClass | ( | ) | const |
uint64_t TypeBuilder::GetWidth | ( | ) | const |
size_t TypeBuilder::GetAlignment | ( | ) | const |
QualifiedName TypeBuilder::GetTypeName | ( | ) | const |
Confidence< bool > TypeBuilder::IsSigned | ( | ) | const |
Confidence< bool > TypeBuilder::IsConst | ( | ) | const |
Confidence< bool > BinaryNinja::TypeBuilder::IsVolatile | ( | ) | const |
bool TypeBuilder::IsSystemCall | ( | ) | const |
void TypeBuilder::SetIntegerTypeDisplayType | ( | BNIntegerDisplayType | displayType | ) |
Confidence< Ref< Type > > TypeBuilder::GetChildType | ( | ) | const |
Confidence< Ref< CallingConvention > > TypeBuilder::GetCallingConvention | ( | ) | const |
vector< FunctionParameter > TypeBuilder::GetParameters | ( | ) | const |
Confidence< bool > TypeBuilder::HasVariableArguments | ( | ) | const |
Confidence< bool > TypeBuilder::CanReturn | ( | ) | const |
Confidence< bool > TypeBuilder::IsPure | ( | ) | const |
Ref< Enumeration > TypeBuilder::GetEnumeration | ( | ) | const |
Ref< NamedTypeReference > TypeBuilder::GetNamedTypeReference | ( | ) | const |
Confidence< BNMemberScope > BinaryNinja::TypeBuilder::GetScope | ( | ) | const |
TypeBuilder & TypeBuilder::SetNamedTypeReference | ( | NamedTypeReference * | ntr | ) |
TypeBuilder & BinaryNinja::TypeBuilder::SetScope | ( | const Confidence< BNMemberScope > & | scope | ) |
TypeBuilder & TypeBuilder::SetConst | ( | const Confidence< bool > & | cnst | ) |
TypeBuilder & TypeBuilder::SetVolatile | ( | const Confidence< bool > & | vltl | ) |
TypeBuilder & TypeBuilder::SetChildType | ( | const Confidence< Ref< Type > > & | child | ) |
TypeBuilder & TypeBuilder::SetSigned | ( | const Confidence< bool > & | vltl | ) |
TypeBuilder & TypeBuilder::SetTypeName | ( | const QualifiedName & | name | ) |
TypeBuilder & TypeBuilder::SetAlternateName | ( | const std::string & | name | ) |
TypeBuilder & TypeBuilder::SetSystemCall | ( | bool | sc, |
uint32_t | n = 0 |
||
) |
Confidence< int64_t > TypeBuilder::GetStackAdjustment | ( | ) | const |
QualifiedName TypeBuilder::GetStructureName | ( | ) | const |
uint64_t TypeBuilder::GetElementCount | ( | ) | const |
uint64_t TypeBuilder::GetOffset | ( | ) | const |
uint32_t TypeBuilder::GetSystemCallNumber | ( | ) | const |
TypeBuilder & TypeBuilder::SetOffset | ( | uint64_t | offset | ) |
TypeBuilder & TypeBuilder::SetFunctionCanReturn | ( | const Confidence< bool > & | canReturn | ) |
TypeBuilder & TypeBuilder::SetPure | ( | const Confidence< bool > & | pure | ) |
TypeBuilder & TypeBuilder::SetParameters | ( | const std::vector< FunctionParameter > & | params | ) |
string TypeBuilder::GetString | ( | Platform * | platform = nullptr | ) | const |
string TypeBuilder::GetTypeAndName | ( | const QualifiedName & | name | ) | const |
string TypeBuilder::GetStringBeforeName | ( | Platform * | platform = nullptr | ) | const |
string TypeBuilder::GetStringAfterName | ( | Platform * | platform = nullptr | ) | const |
vector< InstructionTextToken > TypeBuilder::GetTokens | ( | Platform * | platform = nullptr , |
uint8_t | baseConfidence = 255 |
||
) | const |
vector< InstructionTextToken > TypeBuilder::GetTokensBeforeName | ( | Platform * | platform = nullptr , |
uint8_t | baseConfidence = 255 |
||
) | const |
vector< InstructionTextToken > TypeBuilder::GetTokensAfterName | ( | Platform * | platform = nullptr , |
uint8_t | baseConfidence = 255 |
||
) | const |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
bool BinaryNinja::TypeBuilder::IsReferenceOfType | ( | BNNamedTypeReferenceClass | refType | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
class BinaryNinja::NamedTypeReference |
Additional Inherited Members | |
![]() | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNNamedTypeReference * | m_object |
NamedTypeReference::NamedTypeReference | ( | BNNamedTypeReference * | nt | ) |
BinaryNinja::NamedTypeReference::NamedTypeReference | ( | BNNamedTypeReferenceClass | cls = UnknownNamedTypeClass , |
const std::string & | id = "" , |
||
const QualifiedName & | name = QualifiedName() |
||
) |
BNNamedTypeReferenceClass NamedTypeReference::GetTypeReferenceClass | ( | ) | const |
string NamedTypeReference::GetTypeId | ( | ) | const |
QualifiedName NamedTypeReference::GetName | ( | ) | const |
|
static |
|
static |
|
static |
class BinaryNinja::NamedTypeReferenceBuilder |
Public Member Functions | |
NamedTypeReferenceBuilder (BNNamedTypeReferenceBuilder *nt) | |
NamedTypeReferenceBuilder (BNNamedTypeReferenceClass cls=UnknownNamedTypeClass, const std::string &id="", const QualifiedName &name=QualifiedName()) | |
~NamedTypeReferenceBuilder () | |
BNNamedTypeReferenceBuilder * | GetObject () |
BNNamedTypeReferenceClass | GetTypeReferenceClass () const |
std::string | GetTypeId () const |
QualifiedName | GetName () const |
void | SetTypeReferenceClass (BNNamedTypeReferenceClass type) |
void | SetTypeId (const std::string &id) |
void | SetName (const QualifiedName &name) |
Ref< NamedTypeReference > | Finalize () |
NamedTypeReferenceBuilder::NamedTypeReferenceBuilder | ( | BNNamedTypeReferenceBuilder * | nt | ) |
NamedTypeReferenceBuilder::NamedTypeReferenceBuilder | ( | BNNamedTypeReferenceClass | cls = UnknownNamedTypeClass , |
const std::string & | id = "" , |
||
const QualifiedName & | name = QualifiedName() |
||
) |
NamedTypeReferenceBuilder::~NamedTypeReferenceBuilder | ( | ) |
|
inline |
BNNamedTypeReferenceClass NamedTypeReferenceBuilder::GetTypeReferenceClass | ( | ) | const |
std::string NamedTypeReferenceBuilder::GetTypeId | ( | ) | const |
QualifiedName NamedTypeReferenceBuilder::GetName | ( | ) | const |
void NamedTypeReferenceBuilder::SetTypeReferenceClass | ( | BNNamedTypeReferenceClass | type | ) |
void NamedTypeReferenceBuilder::SetTypeId | ( | const std::string & | id | ) |
void NamedTypeReferenceBuilder::SetName | ( | const QualifiedName & | name | ) |
Ref< NamedTypeReference > NamedTypeReferenceBuilder::Finalize | ( | ) |
struct BinaryNinja::StructureMember |
Class Members | ||
---|---|---|
Ref< Type > | type | |
string | name | |
uint64_t | offset | |
BNMemberAccess | access | |
BNMemberScope | scope |
struct BinaryNinja::InheritedStructureMember |
Class Members | ||
---|---|---|
Ref< NamedTypeReference > | base | |
uint64_t | baseOffset | |
StructureMember | member | |
size_t | memberIndex |
struct BinaryNinja::BaseStructure |
Public Member Functions | |
BaseStructure (NamedTypeReference *type, uint64_t offset, uint64_t width) | |
BaseStructure (Type *type, uint64_t offset) | |
Public Attributes | |
Ref< NamedTypeReference > | type |
uint64_t | offset |
uint64_t | width |
BaseStructure::BaseStructure | ( | NamedTypeReference * | type, |
uint64_t | offset, | ||
uint64_t | width | ||
) |
BaseStructure::BaseStructure | ( | Type * | type, |
uint64_t | offset | ||
) |
Ref<NamedTypeReference> BinaryNinja::BaseStructure::type |
uint64_t BinaryNinja::BaseStructure::offset |
uint64_t BinaryNinja::BaseStructure::width |
class BinaryNinja::Structure |
Structure is a class that wraps built structures and retrieves info about them.
Public Member Functions | |
Structure (BNStructure *s) | |
std::vector< BaseStructure > | GetBaseStructures () const |
Get a list of base structures. More... | |
std::vector< StructureMember > | GetMembers () const |
Get a list of Structure members, excluding those inherited from base structures. More... | |
std::vector< InheritedStructureMember > | GetMembersIncludingInherited (BinaryView *view) const |
Get a list of Structure members, including those inherited from base structures. More... | |
bool | GetMemberIncludingInheritedAtOffset (BinaryView *view, int64_t offset, InheritedStructureMember &result) const |
Get a structure member (including inherited members) at a certain offset. More... | |
bool | GetMemberByName (const std::string &name, StructureMember &result) const |
Get a structure member by name. More... | |
bool | GetMemberAtOffset (int64_t offset, StructureMember &result) const |
Get a structure member at a certain offset. More... | |
bool | GetMemberAtOffset (int64_t offset, StructureMember &result, size_t &idx) const |
Get a structure member and its index at a certain offset. More... | |
uint64_t | GetWidth () const |
Get the structure width in bytes. More... | |
int64_t | GetPointerOffset () const |
Get the structure pointer offset in bytes. More... | |
size_t | GetAlignment () const |
Get the structure alignment. More... | |
bool | IsPacked () const |
Whether the structure is packed. More... | |
bool | IsUnion () const |
Whether the structure is a union. More... | |
bool | PropagateDataVariableReferences () const |
Whether structure field references propagate the references to data variable field values. More... | |
BNStructureVariant | GetStructureType () const |
Get the structure type. More... | |
Ref< Structure > | WithReplacedStructure (Structure *from, Structure *to) |
Ref< Structure > | WithReplacedEnumeration (Enumeration *from, Enumeration *to) |
Ref< Structure > | WithReplacedNamedTypeReference (NamedTypeReference *from, NamedTypeReference *to) |
![]() | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNStructure * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
![]() | |
static BNStructure * | GetObject (CoreRefCountObject *obj) |
static BNStructure * | GetObject (const CoreRefCountObject *obj) |
![]() | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNStructure * | m_object |
Structure::Structure | ( | BNStructure * | s | ) |
vector< BaseStructure > Structure::GetBaseStructures | ( | ) | const |
Get a list of base structures.
Offsets that are not defined by this structure will be filled in by the fields of the base structure(s).
vector< StructureMember > Structure::GetMembers | ( | ) | const |
Get a list of Structure members, excluding those inherited from base structures.
vector< InheritedStructureMember > Structure::GetMembersIncludingInherited | ( | BinaryView * | view | ) | const |
Get a list of Structure members, including those inherited from base structures.
bool Structure::GetMemberIncludingInheritedAtOffset | ( | BinaryView * | view, |
int64_t | offset, | ||
InheritedStructureMember & | result | ||
) | const |
Get a structure member (including inherited members) at a certain offset.
view | The relevant binary view |
offset | Offset to check |
result | Reference to a InheritedStructureMember to copy the result to |
bool Structure::GetMemberByName | ( | const std::string & | name, |
StructureMember & | result | ||
) | const |
Get a structure member by name.
name | Name of the member to retrieve |
result | Reference to a StructureMember to copy the result to |
bool Structure::GetMemberAtOffset | ( | int64_t | offset, |
StructureMember & | result | ||
) | const |
Get a structure member at a certain offset.
offset | Offset to check |
result | Reference to a StructureMember to copy the result to |
bool Structure::GetMemberAtOffset | ( | int64_t | offset, |
StructureMember & | result, | ||
size_t & | idx | ||
) | const |
Get a structure member and its index at a certain offset.
offset | Offset to check |
result | Reference to a StructureMember to copy the result to |
idx | Reference to a size_t to copy the index to |
uint64_t Structure::GetWidth | ( | ) | const |
Get the structure width in bytes.
int64_t Structure::GetPointerOffset | ( | ) | const |
Get the structure pointer offset in bytes.
Pointers to this structure will implicitly have this offset subtracted from the pointer to arrive at the start of the structure. Effectively, the pointer offset becomes the new start of the structure, and fields before it are accessed using negative offsets from the pointer.
size_t Structure::GetAlignment | ( | ) | const |
Get the structure alignment.
bool Structure::IsPacked | ( | ) | const |
Whether the structure is packed.
bool Structure::IsUnion | ( | ) | const |
Whether the structure is a union.
bool Structure::PropagateDataVariableReferences | ( | ) | const |
Whether structure field references propagate the references to data variable field values.
BNStructureVariant Structure::GetStructureType | ( | ) | const |
Get the structure type.
Ref< Structure > Structure::WithReplacedEnumeration | ( | Enumeration * | from, |
Enumeration * | to | ||
) |
Ref< Structure > Structure::WithReplacedNamedTypeReference | ( | NamedTypeReference * | from, |
NamedTypeReference * | to | ||
) |
class BinaryNinja::StructureBuilder |
StructureBuilder is a convenience class used for building Structure Types.
Example:
Public Member Functions | |
StructureBuilder () | |
StructureBuilder (BNStructureBuilder *s) | |
StructureBuilder (BNStructureVariant type, bool packed=false) | |
StructureBuilder (const StructureBuilder &s) | |
StructureBuilder (StructureBuilder &&s) | |
StructureBuilder (Structure *s) | |
~StructureBuilder () | |
StructureBuilder & | operator= (const StructureBuilder &s) |
StructureBuilder & | operator= (StructureBuilder &&s) |
StructureBuilder & | operator= (Structure *s) |
BNStructureBuilder * | GetObject () |
Ref< Structure > | Finalize () const |
Complete the structure building process and return a Structure object. More... | |
std::vector< BaseStructure > | GetBaseStructures () const |
StructureBuilder & | SetBaseStructures (const std::vector< BaseStructure > &bases) |
std::vector< StructureMember > | GetMembers () const |
GetMembers returns a list of structure members. More... | |
bool | GetMemberByName (const std::string &name, StructureMember &result) const |
GetMemberByName retrieves a structure member by name. More... | |
bool | GetMemberAtOffset (int64_t offset, StructureMember &result) const |
bool | GetMemberAtOffset (int64_t offset, StructureMember &result, size_t &idx) const |
uint64_t | GetWidth () const |
StructureBuilder & | SetWidth (size_t width) |
int64_t | GetPointerOffset () const |
StructureBuilder & | SetPointerOffset (int64_t offset) |
size_t | GetAlignment () const |
StructureBuilder & | SetAlignment (size_t align) |
bool | IsPacked () const |
StructureBuilder & | SetPacked (bool packed) |
bool | IsUnion () const |
bool | PropagateDataVariableReferences () const |
StructureBuilder & | SetPropagateDataVariableReferences (bool value) |
StructureBuilder & | SetStructureType (BNStructureVariant type) |
Set the structure type. More... | |
BNStructureVariant | GetStructureType () const |
Get the Structure Type. More... | |
StructureBuilder & | AddMember (const Confidence< Ref< Type > > &type, const std::string &name, BNMemberAccess access=NoAccess, BNMemberScope scope=NoScope) |
AddMember adds a member (field) to a structure. More... | |
StructureBuilder & | AddMemberAtOffset (const Confidence< Ref< Type > > &type, const std::string &name, uint64_t offset, bool overwriteExisting=true, BNMemberAccess access=NoAccess, BNMemberScope scope=NoScope) |
AddMemberAtOffset adds a member at a specific offset within the struct. More... | |
StructureBuilder & | RemoveMember (size_t idx) |
RemoveMember removes a member at a specified index. More... | |
StructureBuilder & | ReplaceMember (size_t idx, const Confidence< Ref< Type > > &type, const std::string &name, bool overwriteExisting=true) |
ReplaceMember replaces a member at an index. More... | |
StructureBuilder::StructureBuilder | ( | ) |
StructureBuilder::StructureBuilder | ( | BNStructureBuilder * | s | ) |
StructureBuilder::StructureBuilder | ( | BNStructureVariant | type, |
bool | packed = false |
||
) |
StructureBuilder::StructureBuilder | ( | const StructureBuilder & | s | ) |
StructureBuilder::StructureBuilder | ( | StructureBuilder && | s | ) |
StructureBuilder::StructureBuilder | ( | Structure * | s | ) |
StructureBuilder::~StructureBuilder | ( | ) |
StructureBuilder & StructureBuilder::operator= | ( | const StructureBuilder & | s | ) |
StructureBuilder & StructureBuilder::operator= | ( | StructureBuilder && | s | ) |
StructureBuilder & StructureBuilder::operator= | ( | Structure * | s | ) |
|
inline |
vector< BaseStructure > StructureBuilder::GetBaseStructures | ( | ) | const |
StructureBuilder & StructureBuilder::SetBaseStructures | ( | const std::vector< BaseStructure > & | bases | ) |
vector< StructureMember > StructureBuilder::GetMembers | ( | ) | const |
GetMembers returns a list of structure members.
bool StructureBuilder::GetMemberByName | ( | const std::string & | name, |
StructureMember & | result | ||
) | const |
GetMemberByName retrieves a structure member by name.
name | Name of the member (field) |
result | Reference to a StructureMember object the field will be passed to |
bool StructureBuilder::GetMemberAtOffset | ( | int64_t | offset, |
StructureMember & | result | ||
) | const |
bool StructureBuilder::GetMemberAtOffset | ( | int64_t | offset, |
StructureMember & | result, | ||
size_t & | idx | ||
) | const |
uint64_t StructureBuilder::GetWidth | ( | ) | const |
StructureBuilder & StructureBuilder::SetWidth | ( | size_t | width | ) |
int64_t StructureBuilder::GetPointerOffset | ( | ) | const |
StructureBuilder & StructureBuilder::SetPointerOffset | ( | int64_t | offset | ) |
size_t StructureBuilder::GetAlignment | ( | ) | const |
StructureBuilder & StructureBuilder::SetAlignment | ( | size_t | align | ) |
bool StructureBuilder::IsPacked | ( | ) | const |
StructureBuilder & StructureBuilder::SetPacked | ( | bool | packed | ) |
bool StructureBuilder::IsUnion | ( | ) | const |
bool StructureBuilder::PropagateDataVariableReferences | ( | ) | const |
StructureBuilder & StructureBuilder::SetPropagateDataVariableReferences | ( | bool | value | ) |
StructureBuilder & StructureBuilder::SetStructureType | ( | BNStructureVariant | type | ) |
Set the structure type.
type | One of: ClassStructureType, StructStructureType, UnionStructureType |
BNStructureVariant StructureBuilder::GetStructureType | ( | ) | const |
StructureBuilder & StructureBuilder::AddMember | ( | const Confidence< Ref< Type > > & | type, |
const std::string & | name, | ||
BNMemberAccess | access = NoAccess , |
||
BNMemberScope | scope = NoScope |
||
) |
AddMember adds a member (field) to a structure.
type | Type of the Field |
name | Name of the field |
access | Optional, One of NoAccess, PrivateAccess, ProtectedAccess, PublicAccess |
scope | Optional, One of NoScope, StaticScope, VirtualScope, ThunkScope, FriendScope |
StructureBuilder & StructureBuilder::AddMemberAtOffset | ( | const Confidence< Ref< Type > > & | type, |
const std::string & | name, | ||
uint64_t | offset, | ||
bool | overwriteExisting = true , |
||
BNMemberAccess | access = NoAccess , |
||
BNMemberScope | scope = NoScope |
||
) |
AddMemberAtOffset adds a member at a specific offset within the struct.
type | Type of the Field |
name | Name of the field |
offset | Offset to add the member within the struct |
overwriteExisting | Whether to overwrite an existing member at that offset, Optional, default true |
access | One of NoAccess, PrivateAccess, ProtectedAccess, PublicAccess |
scope | One of NoScope, StaticScope, VirtualScope, ThunkScope, FriendScope |
StructureBuilder & StructureBuilder::RemoveMember | ( | size_t | idx | ) |
RemoveMember removes a member at a specified index.
idx | Index to remove |
StructureBuilder & StructureBuilder::ReplaceMember | ( | size_t | idx, |
const Confidence< Ref< Type > > & | type, | ||
const std::string & | name, | ||
bool | overwriteExisting = true |
||
) |
ReplaceMember replaces a member at an index.
idx | Index of the StructureMember to be replaced |
type | Type of the new Member |
name | Name of the new Member |
overwriteExisting | Whether to overwrite the existing member, default true |
class BinaryNinja::Enumeration |
Public Member Functions | |
Enumeration (BNEnumeration *e) | |
std::vector< InstructionTextToken > | GetTokensForValue (uint64_t value, size_t width, Ref< Type > type) |
std::vector< EnumerationMember > | GetMembers () const |
![]() | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNEnumeration * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
![]() | |
static BNEnumeration * | GetObject (CoreRefCountObject *obj) |
static BNEnumeration * | GetObject (const CoreRefCountObject *obj) |
![]() | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNEnumeration * | m_object |
Enumeration::Enumeration | ( | BNEnumeration * | e | ) |
vector< InstructionTextToken > Enumeration::GetTokensForValue | ( | uint64_t | value, |
size_t | width, | ||
Ref< Type > | type | ||
) |
vector< EnumerationMember > Enumeration::GetMembers | ( | ) | const |
class BinaryNinja::EnumerationBuilder |
EnumerationBuilder is a convenience class used for building Enumeration Types.
Example:
EnumerationBuilder::EnumerationBuilder | ( | ) |
EnumerationBuilder::EnumerationBuilder | ( | BNEnumerationBuilder * | e | ) |
EnumerationBuilder::EnumerationBuilder | ( | const EnumerationBuilder & | e | ) |
EnumerationBuilder::EnumerationBuilder | ( | EnumerationBuilder && | e | ) |
EnumerationBuilder::EnumerationBuilder | ( | Enumeration * | e | ) |
EnumerationBuilder::~EnumerationBuilder | ( | ) |
|
inline |
EnumerationBuilder & EnumerationBuilder::operator= | ( | const EnumerationBuilder & | e | ) |
EnumerationBuilder & EnumerationBuilder::operator= | ( | EnumerationBuilder && | e | ) |
EnumerationBuilder & EnumerationBuilder::operator= | ( | Enumeration * | e | ) |
Ref< Enumeration > EnumerationBuilder::Finalize | ( | ) | const |
Finalize the building process and return the built Enumeration.
vector< EnumerationMember > EnumerationBuilder::GetMembers | ( | ) | const |
Get a list of members in this enum.
EnumerationBuilder & EnumerationBuilder::AddMember | ( | const std::string & | name | ) |
Add a member to the enum.
name | Name of the enum member |
EnumerationBuilder & EnumerationBuilder::AddMemberWithValue | ( | const std::string & | name, |
uint64_t | value | ||
) |
Add a member to the enum with a set value.
name | Name of the enum member |
value | Value of th enum member |
EnumerationBuilder & EnumerationBuilder::RemoveMember | ( | size_t | idx | ) |
Remove a member from the enum.
idx | Index to remove |
EnumerationBuilder & EnumerationBuilder::ReplaceMember | ( | size_t | idx, |
const std::string & | name, | ||
uint64_t | value | ||
) |
Replace a member at an index.
idx | Index to replace |
name | Name of the new member |
value | Value of the new member |