BinaryNinja::BinaryView Class Reference

Detailed Description

BinaryView is the base class for creating views on binary data (e.g.

ELF, PE, Mach-O). BinaryView should be subclassed to create a new BinaryView

Public Member Functions

 BinaryView (BNBinaryView *view)
 
virtual bool Init ()
 
FileMetadataGetFile () const
 
Ref< BinaryViewGetParentView () const
 
std::string GetTypeName () const
 
bool IsModified () const
 
bool IsAnalysisChanged () const
 
bool CreateDatabase (const std::string &path, Ref< SaveSettings > settings=new SaveSettings())
 
bool CreateDatabase (const std::string &path, const std::function< bool(size_t progress, size_t total)> &progressCallback, Ref< SaveSettings > settings=new SaveSettings())
 
bool SaveAutoSnapshot (Ref< SaveSettings > settings=new SaveSettings())
 
bool SaveAutoSnapshot (const std::function< bool(size_t progress, size_t total)> &progressCallback, Ref< SaveSettings > settings=new SaveSettings())
 
void BeginUndoActions ()
 
void AddUndoAction (UndoAction *action)
 
void CommitUndoActions ()
 
bool Undo ()
 
bool Redo ()
 
std::string GetCurrentView ()
 
uint64_t GetCurrentOffset ()
 
bool Navigate (const std::string &view, uint64_t offset)
 
size_t Read (void *dest, uint64_t offset, size_t len)
 
DataBuffer ReadBuffer (uint64_t offset, size_t len)
 
size_t Write (uint64_t offset, const void *data, size_t len)
 
size_t WriteBuffer (uint64_t offset, const DataBuffer &data)
 
size_t Insert (uint64_t offset, const void *data, size_t len)
 
size_t InsertBuffer (uint64_t offset, const DataBuffer &data)
 
size_t Remove (uint64_t offset, uint64_t len)
 
std::vector< float > GetEntropy (uint64_t offset, size_t len, size_t blockSize)
 
BNModificationStatus GetModification (uint64_t offset)
 
std::vector< BNModificationStatusGetModification (uint64_t offset, size_t len)
 
bool IsValidOffset (uint64_t offset) const
 
bool IsOffsetReadable (uint64_t offset) const
 
bool IsOffsetWritable (uint64_t offset) const
 
bool IsOffsetExecutable (uint64_t offset) const
 
bool IsOffsetBackedByFile (uint64_t offset) const
 
bool IsOffsetCodeSemantics (uint64_t offset) const
 
bool IsOffsetWritableSemantics (uint64_t offset) const
 
bool IsOffsetExternSemantics (uint64_t offset) const
 
uint64_t GetNextValidOffset (uint64_t offset) const
 
uint64_t GetStart () const
 
uint64_t GetEnd () const
 
uint64_t GetLength () const
 
uint64_t GetEntryPoint () const
 
Ref< ArchitectureGetDefaultArchitecture () const
 
void SetDefaultArchitecture (Architecture *arch)
 
Ref< PlatformGetDefaultPlatform () const
 
void SetDefaultPlatform (Platform *platform)
 
BNEndianness GetDefaultEndianness () const
 
bool IsRelocatable () const
 
size_t GetAddressSize () const
 
bool IsExecutable () const
 
bool Save (FileAccessor *file)
 
bool Save (const std::string &path)
 
void DefineRelocation (Architecture *arch, BNRelocationInfo &info, uint64_t target, uint64_t reloc)
 
void DefineRelocation (Architecture *arch, BNRelocationInfo &info, Ref< Symbol > target, uint64_t reloc)
 
std::vector< std::pair< uint64_t, uint64_t > > GetRelocationRanges () const
 
std::vector< std::pair< uint64_t, uint64_t > > GetRelocationRangesAtAddress (uint64_t addr) const
 
bool RangeContainsRelocation (uint64_t addr, size_t size) const
 
void RegisterNotification (BinaryDataNotification *notify)
 
void UnregisterNotification (BinaryDataNotification *notify)
 
void AddAnalysisOption (const std::string &name)
 
void AddFunctionForAnalysis (Platform *platform, uint64_t addr)
 
void AddEntryPointForAnalysis (Platform *platform, uint64_t start)
 
void RemoveAnalysisFunction (Function *func)
 
void CreateUserFunction (Platform *platform, uint64_t start)
 
void RemoveUserFunction (Function *func)
 
bool HasInitialAnalysis ()
 
void SetAnalysisHold (bool enable)
 
void UpdateAnalysisAndWait ()
 
void UpdateAnalysis ()
 
void AbortAnalysis ()
 
void DefineDataVariable (uint64_t addr, const Confidence< Ref< Type > > &type)
 
void DefineUserDataVariable (uint64_t addr, const Confidence< Ref< Type > > &type)
 
void UndefineDataVariable (uint64_t addr)
 
void UndefineUserDataVariable (uint64_t addr)
 
std::map< uint64_t, DataVariableGetDataVariables ()
 
bool GetDataVariableAtAddress (uint64_t addr, DataVariable &var)
 
std::vector< Ref< Function > > GetAnalysisFunctionList ()
 
bool HasFunctions () const
 
Ref< FunctionGetAnalysisFunction (Platform *platform, uint64_t addr)
 
Ref< FunctionGetRecentAnalysisFunctionForAddress (uint64_t addr)
 
std::vector< Ref< Function > > GetAnalysisFunctionsForAddress (uint64_t addr)
 
std::vector< Ref< Function > > GetAnalysisFunctionsContainingAddress (uint64_t addr)
 
Ref< FunctionGetAnalysisEntryPoint ()
 
Ref< BasicBlockGetRecentBasicBlockForAddress (uint64_t addr)
 
std::vector< Ref< BasicBlock > > GetBasicBlocksForAddress (uint64_t addr)
 
std::vector< Ref< BasicBlock > > GetBasicBlocksStartingAtAddress (uint64_t addr)
 
std::vector< ReferenceSourceGetCodeReferences (uint64_t addr)
 
std::vector< ReferenceSourceGetCodeReferences (uint64_t addr, uint64_t len)
 
std::vector< uint64_t > GetCodeReferencesFrom (ReferenceSource src)
 
std::vector< uint64_t > GetCodeReferencesFrom (ReferenceSource src, uint64_t len)
 
std::vector< uint64_t > GetDataReferences (uint64_t addr)
 
std::vector< uint64_t > GetDataReferences (uint64_t addr, uint64_t len)
 
std::vector< uint64_t > GetDataReferencesFrom (uint64_t addr)
 
std::vector< uint64_t > GetDataReferencesFrom (uint64_t addr, uint64_t len)
 
void AddUserDataReference (uint64_t fromAddr, uint64_t toAddr)
 
void RemoveUserDataReference (uint64_t fromAddr, uint64_t toAddr)
 
std::vector< ReferenceSourceGetCodeReferencesForType (const QualifiedName &type)
 
std::vector< uint64_t > GetDataReferencesForType (const QualifiedName &type)
 
std::vector< TypeReferenceSourceGetTypeReferencesForType (const QualifiedName &type)
 
std::vector< TypeFieldReferenceGetCodeReferencesForTypeField (const QualifiedName &type, uint64_t offset)
 
std::vector< uint64_t > GetDataReferencesForTypeField (const QualifiedName &type, uint64_t offset)
 
std::vector< TypeReferenceSourceGetTypeReferencesForTypeField (const QualifiedName &type, uint64_t offset)
 
std::vector< TypeReferenceSourceGetCodeReferencesForTypeFrom (ReferenceSource src)
 
std::vector< TypeReferenceSourceGetCodeReferencesForTypeFrom (ReferenceSource src, uint64_t len)
 
std::vector< TypeReferenceSourceGetCodeReferencesForTypeFieldFrom (ReferenceSource src)
 
std::vector< TypeReferenceSourceGetCodeReferencesForTypeFieldFrom (ReferenceSource src, uint64_t len)
 
std::vector< uint64_t > GetAllFieldsReferenced (const QualifiedName &type)
 
std::map< uint64_t, std::vector< size_t > > GetAllSizesReferenced (const QualifiedName &type)
 
std::map< uint64_t, std::vector< Confidence< Ref< Type > > > > GetAllTypesReferenced (const QualifiedName &type)
 
std::vector< size_t > GetSizesReferenced (const QualifiedName &type, uint64_t offset)
 
std::vector< Confidence< Ref< Type > > > GetTypesReferenced (const QualifiedName &type, uint64_t offset)
 
Ref< StructureCreateStructureBasedOnFieldAccesses (const QualifiedName &type)
 
std::vector< uint64_t > GetCallees (ReferenceSource addr)
 
std::vector< ReferenceSourceGetCallers (uint64_t addr)
 
Ref< SymbolGetSymbolByAddress (uint64_t addr, const NameSpace &nameSpace=NameSpace())
 
Ref< SymbolGetSymbolByRawName (const std::string &name, const NameSpace &nameSpace=NameSpace())
 
std::vector< Ref< Symbol > > GetSymbolsByName (const std::string &name, const NameSpace &nameSpace=NameSpace())
 
std::vector< Ref< Symbol > > GetSymbols (const NameSpace &nameSpace=NameSpace())
 
std::vector< Ref< Symbol > > GetSymbols (uint64_t start, uint64_t len, const NameSpace &nameSpace=NameSpace())
 
std::vector< Ref< Symbol > > GetSymbolsOfType (BNSymbolType type, const NameSpace &nameSpace=NameSpace())
 
std::vector< Ref< Symbol > > GetSymbolsOfType (BNSymbolType type, uint64_t start, uint64_t len, const NameSpace &nameSpace=NameSpace())
 
std::vector< Ref< Symbol > > GetVisibleSymbols (const NameSpace &nameSpace=NameSpace())
 
void DefineAutoSymbol (Ref< Symbol > sym)
 
Ref< SymbolDefineAutoSymbolAndVariableOrFunction (Ref< Platform > platform, Ref< Symbol > sym, Ref< Type > type)
 
void UndefineAutoSymbol (Ref< Symbol > sym)
 
void DefineUserSymbol (Ref< Symbol > sym)
 
void UndefineUserSymbol (Ref< Symbol > sym)
 
void DefineImportedFunction (Ref< Symbol > importAddressSym, Ref< Function > func, Ref< Type > type=nullptr)
 
void BeginBulkModifySymbols ()
 
void EndBulkModifySymbols ()
 
void AddTagType (Ref< TagType > tagType)
 
void RemoveTagType (Ref< TagType > tagType)
 
Ref< TagTypeGetTagType (const std::string &name)
 
Ref< TagTypeGetTagType (const std::string &name, TagType::Type type)
 
Ref< TagTypeGetTagTypeByName (const std::string &name)
 
Ref< TagTypeGetTagTypeByName (const std::string &name, TagType::Type type)
 
Ref< TagTypeGetTagTypeById (const std::string &id)
 
Ref< TagTypeGetTagTypeById (const std::string &id, TagType::Type type)
 
std::vector< Ref< TagType > > GetTagTypes ()
 
void AddTag (Ref< Tag > tag, bool user=false)
 
void RemoveTag (Ref< Tag > tag, bool user=false)
 
Ref< TagGetTag (const std::string &tagId)
 
std::vector< TagReferenceGetAllTagReferences ()
 
std::vector< TagReferenceGetAllAddressTagReferences ()
 
std::vector< TagReferenceGetAllFunctionTagReferences ()
 
std::vector< TagReferenceGetAllTagReferencesOfType (Ref< TagType > tagType)
 
std::vector< TagReferenceGetTagReferencesOfType (Ref< TagType > tagType)
 
size_t GetTagReferencesOfTypeCount (Ref< TagType > tagType)
 
size_t GetAllTagReferencesOfTypeCount (Ref< TagType > tagType)
 
std::map< Ref< TagType >, size_t > GetAllTagReferenceTypeCounts ()
 
std::vector< TagReferenceGetDataTagReferences ()
 
std::vector< TagReferenceGetAutoDataTagReferences ()
 
std::vector< TagReferenceGetUserDataTagReferences ()
 
std::vector< Ref< Tag > > GetDataTags (uint64_t addr)
 
std::vector< Ref< Tag > > GetAutoDataTags (uint64_t addr)
 
std::vector< Ref< Tag > > GetUserDataTags (uint64_t addr)
 
std::vector< Ref< Tag > > GetDataTagsOfType (uint64_t addr, Ref< TagType > tagType)
 
std::vector< Ref< Tag > > GetAutoDataTagsOfType (uint64_t addr, Ref< TagType > tagType)
 
std::vector< Ref< Tag > > GetUserDataTagsOfType (uint64_t addr, Ref< TagType > tagType)
 
std::vector< TagReferenceGetDataTagsInRange (uint64_t start, uint64_t end)
 
std::vector< TagReferenceGetAutoDataTagsInRange (uint64_t start, uint64_t end)
 
std::vector< TagReferenceGetUserDataTagsInRange (uint64_t start, uint64_t end)
 
void AddAutoDataTag (uint64_t addr, Ref< Tag > tag)
 
void RemoveAutoDataTag (uint64_t addr, Ref< Tag > tag)
 
void RemoveAutoDataTagsOfType (uint64_t addr, Ref< TagType > tagType)
 
void AddUserDataTag (uint64_t addr, Ref< Tag > tag)
 
void RemoveUserDataTag (uint64_t addr, Ref< Tag > tag)
 
void RemoveUserDataTagsOfType (uint64_t addr, Ref< TagType > tagType)
 
void RemoveTagReference (const TagReference &ref)
 
Ref< TagCreateAutoDataTag (uint64_t addr, const std::string &tagTypeName, const std::string &data, bool unique=false)
 
Ref< TagCreateUserDataTag (uint64_t addr, const std::string &tagTypeName, const std::string &data, bool unique=false)
 
Ref< TagCreateAutoDataTag (uint64_t addr, Ref< TagType > tagType, const std::string &data, bool unique=false)
 
Ref< TagCreateUserDataTag (uint64_t addr, Ref< TagType > tagType, const std::string &data, bool unique=false)
 
bool CanAssemble (Architecture *arch)
 
bool IsNeverBranchPatchAvailable (Architecture *arch, uint64_t addr)
 
bool IsAlwaysBranchPatchAvailable (Architecture *arch, uint64_t addr)
 
bool IsInvertBranchPatchAvailable (Architecture *arch, uint64_t addr)
 
bool IsSkipAndReturnZeroPatchAvailable (Architecture *arch, uint64_t addr)
 
bool IsSkipAndReturnValuePatchAvailable (Architecture *arch, uint64_t addr)
 
bool ConvertToNop (Architecture *arch, uint64_t addr)
 
bool AlwaysBranch (Architecture *arch, uint64_t addr)
 
bool InvertBranch (Architecture *arch, uint64_t addr)
 
bool SkipAndReturnValue (Architecture *arch, uint64_t addr, uint64_t value)
 
size_t GetInstructionLength (Architecture *arch, uint64_t addr)
 
bool GetStringAtAddress (uint64_t addr, BNStringReference &strRef)
 
std::vector< BNStringReferenceGetStrings ()
 
std::vector< BNStringReferenceGetStrings (uint64_t start, uint64_t len)
 
Ref< AnalysisCompletionEventAddAnalysisCompletionEvent (const std::function< void()> &callback)
 
AnalysisInfo GetAnalysisInfo ()
 
BNAnalysisProgress GetAnalysisProgress ()
 
Ref< BackgroundTaskGetBackgroundAnalysisTask ()
 
uint64_t GetNextFunctionStartAfterAddress (uint64_t addr)
 
uint64_t GetNextBasicBlockStartAfterAddress (uint64_t addr)
 
uint64_t GetNextDataAfterAddress (uint64_t addr)
 
uint64_t GetNextDataVariableStartAfterAddress (uint64_t addr)
 
uint64_t GetPreviousFunctionStartBeforeAddress (uint64_t addr)
 
uint64_t GetPreviousBasicBlockStartBeforeAddress (uint64_t addr)
 
uint64_t GetPreviousBasicBlockEndBeforeAddress (uint64_t addr)
 
uint64_t GetPreviousDataBeforeAddress (uint64_t addr)
 
uint64_t GetPreviousDataVariableStartBeforeAddress (uint64_t addr)
 
bool ParsePossibleValueSet (const std::string &value, BNRegisterValueType state, PossibleValueSet &result, uint64_t here, std::string &errors)
 
bool ParseTypeString (const std::string &text, QualifiedNameAndType &result, std::string &errors, const std::set< QualifiedName > &typesAllowRedefinition={})
 
bool ParseTypeString (const std::string &text, std::map< QualifiedName, Ref< Type > > &types, std::map< QualifiedName, Ref< Type > > &variables, std::map< QualifiedName, Ref< Type > > &functions, std::string &errors, const std::set< QualifiedName > &typesAllowRedefinition={})
 
bool ParseTypesFromSource (const std::string &text, const std::vector< std::string > &options, const std::vector< std::string > &includeDirs, TypeParserResult &result, std::string &errors, const std::set< QualifiedName > &typesAllowRedefinition={})
 
std::map< QualifiedName, Ref< Type > > GetTypes ()
 
std::vector< QualifiedNameGetTypeNames (const std::string &matching="")
 
Ref< TypeGetTypeByName (const QualifiedName &name)
 
Ref< TypeGetTypeById (const std::string &id)
 
std::string GetTypeId (const QualifiedName &name)
 
QualifiedName GetTypeNameById (const std::string &id)
 
bool IsTypeAutoDefined (const QualifiedName &name)
 
QualifiedName DefineType (const std::string &id, const QualifiedName &defaultName, Ref< Type > type)
 
void DefineTypes (const std::vector< std::pair< std::string, QualifiedNameAndType > > &types, std::function< bool(size_t, size_t)> progress={})
 
void DefineUserType (const QualifiedName &name, Ref< Type > type)
 
void DefineUserTypes (const std::vector< QualifiedNameAndType > &types, std::function< bool(size_t, size_t)> progress={})
 
void UndefineType (const std::string &id)
 
void UndefineUserType (const QualifiedName &name)
 
void RenameType (const QualifiedName &oldName, const QualifiedName &newName)
 
void RegisterPlatformTypes (Platform *platform)
 
bool FindNextData (uint64_t start, const DataBuffer &data, uint64_t &result, BNFindFlag flags=FindCaseSensitive)
 
bool FindNextText (uint64_t start, const std::string &data, uint64_t &result, Ref< DisassemblySettings > settings, BNFindFlag flags=FindCaseSensitive, BNFunctionGraphType graph=NormalFunctionGraph)
 
bool FindNextConstant (uint64_t start, uint64_t constant, uint64_t &result, Ref< DisassemblySettings > settings, BNFunctionGraphType graph=NormalFunctionGraph)
 
bool FindNextData (uint64_t start, uint64_t end, const DataBuffer &data, uint64_t &addr, BNFindFlag flags, const std::function< bool(size_t current, size_t total)> &progress)
 
bool FindNextText (uint64_t start, uint64_t end, const std::string &data, uint64_t &addr, Ref< DisassemblySettings > settings, BNFindFlag flags, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &progress)
 
bool FindNextConstant (uint64_t start, uint64_t end, uint64_t constant, uint64_t &addr, Ref< DisassemblySettings > settings, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &progress)
 
bool FindAllData (uint64_t start, uint64_t end, const DataBuffer &data, BNFindFlag flags, const std::function< bool(size_t current, size_t total)> &progress, const std::function< bool(uint64_t addr, const DataBuffer &match)> &matchCallback)
 
bool FindAllText (uint64_t start, uint64_t end, const std::string &data, Ref< DisassemblySettings > settings, BNFindFlag flags, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &progress, const std::function< bool(uint64_t addr, const std::string &match, const LinearDisassemblyLine &line)> &matchCallback)
 
bool FindAllConstant (uint64_t start, uint64_t end, uint64_t constant, Ref< DisassemblySettings > settings, BNFunctionGraphType graph, const std::function< bool(size_t current, size_t total)> &progress, const std::function< bool(uint64_t addr, const LinearDisassemblyLine &line)> &matchCallback)
 
void Reanalyze ()
 
Ref< WorkflowGetWorkflow () const
 
void ShowPlainTextReport (const std::string &title, const std::string &contents)
 
void ShowMarkdownReport (const std::string &title, const std::string &contents, const std::string &plainText)
 
void ShowHTMLReport (const std::string &title, const std::string &contents, const std::string &plainText)
 
void ShowGraphReport (const std::string &title, FlowGraph *graph)
 
bool GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title)
 
bool GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title, uint64_t currentAddress)
 
void AddAutoSegment (uint64_t start, uint64_t length, uint64_t dataOffset, uint64_t dataLength, uint32_t flags)
 
void RemoveAutoSegment (uint64_t start, uint64_t length)
 
void AddUserSegment (uint64_t start, uint64_t length, uint64_t dataOffset, uint64_t dataLength, uint32_t flags)
 
void RemoveUserSegment (uint64_t start, uint64_t length)
 
std::vector< Ref< Segment > > GetSegments ()
 
Ref< SegmentGetSegmentAt (uint64_t addr)
 
bool GetAddressForDataOffset (uint64_t offset, uint64_t &addr)
 
void AddAutoSection (const std::string &name, uint64_t start, uint64_t length, BNSectionSemantics semantics=DefaultSectionSemantics, const std::string &type="", uint64_t align=1, uint64_t entrySize=0, const std::string &linkedSection="", const std::string &infoSection="", uint64_t infoData=0)
 
void RemoveAutoSection (const std::string &name)
 
void AddUserSection (const std::string &name, uint64_t start, uint64_t length, BNSectionSemantics semantics=DefaultSectionSemantics, const std::string &type="", uint64_t align=1, uint64_t entrySize=0, const std::string &linkedSection="", const std::string &infoSection="", uint64_t infoData=0)
 
void RemoveUserSection (const std::string &name)
 
std::vector< Ref< Section > > GetSections ()
 
std::vector< Ref< Section > > GetSectionsAt (uint64_t addr)
 
Ref< SectionGetSectionByName (const std::string &name)
 
std::vector< std::string > GetUniqueSectionNames (const std::vector< std::string > &names)
 
std::string GetCommentForAddress (uint64_t addr) const
 
std::vector< uint64_t > GetCommentedAddresses () const
 
void SetCommentForAddress (uint64_t addr, const std::string &comment)
 
std::vector< BNAddressRangeGetAllocatedRanges ()
 
void StoreMetadata (const std::string &key, Ref< Metadata > value, bool isAuto=false)
 
Ref< MetadataQueryMetadata (const std::string &key)
 
void RemoveMetadata (const std::string &key)
 
std::string GetStringMetadata (const std::string &key)
 
std::vector< uint8_t > GetRawMetadata (const std::string &key)
 
uint64_t GetUIntMetadata (const std::string &key)
 
std::vector< std::string > GetLoadSettingsTypeNames ()
 
Ref< SettingsGetLoadSettings (const std::string &typeName)
 
void SetLoadSettings (const std::string &typeName, Ref< Settings > settings)
 
BNAnalysisParameters GetParametersForAnalysis ()
 
void SetParametersForAnalysis (BNAnalysisParameters params)
 
uint64_t GetMaxFunctionSizeForAnalysis ()
 
void SetMaxFunctionSizeForAnalysis (uint64_t size)
 
bool GetNewAutoFunctionAnalysisSuppressed ()
 
void SetNewAutoFunctionAnalysisSuppressed (bool suppress)
 
std::set< NameSpaceGetNameSpaces () const
 
bool HasSymbols () const
 
bool HasDataVariables () const
 
Ref< StructureCreateStructureFromOffsetAccess (const QualifiedName &type, bool *newMemberAdded) const
 
Confidence< Ref< Type > > CreateStructureMemberFromAccess (const QualifiedName &name, uint64_t offset) const
 
Ref< LoggerCreateLogger (const std::string &name)
 
- Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNBinaryView, BNNewViewReference, BNFreeBinaryView >
 CoreRefCountObject ()
 
virtual ~CoreRefCountObject ()
 
BNBinaryView * GetObject () const
 
void AddRef ()
 
void Release ()
 
void AddRefForRegistration ()
 
void ReleaseForRegistration ()
 

Static Public Member Functions

static NameSpace GetInternalNameSpace ()
 
static NameSpace GetExternalNameSpace ()
 
static bool ParseExpression (Ref< BinaryView > view, const std::string &expression, uint64_t &offset, uint64_t here, std::string &errorString)
 
- Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNBinaryView, BNNewViewReference, BNFreeBinaryView >
static BNBinaryView * GetObject (CoreRefCountObject *obj)
 

Protected Member Functions

 BinaryView (const std::string &typeName, FileMetadata *file, BinaryView *parentView=nullptr)
 BinaryView constructor. More...
 
virtual size_t PerformRead (void *dest, uint64_t offset, size_t len)
 PerformRead provides a mapping between the flat file and virtual offsets in the file. More...
 
virtual size_t PerformWrite (uint64_t offset, const void *data, size_t len)
 
virtual size_t PerformInsert (uint64_t offset, const void *data, size_t len)
 
virtual size_t PerformRemove (uint64_t offset, uint64_t len)
 
virtual BNModificationStatus PerformGetModification (uint64_t offset)
 
virtual bool PerformIsValidOffset (uint64_t offset)
 
virtual bool PerformIsOffsetReadable (uint64_t offset)
 
virtual bool PerformIsOffsetWritable (uint64_t offset)
 
virtual bool PerformIsOffsetExecutable (uint64_t offset)
 
virtual bool PerformIsOffsetBackedByFile (uint64_t offset)
 
virtual uint64_t PerformGetNextValidOffset (uint64_t offset)
 
virtual uint64_t PerformGetStart () const
 
virtual uint64_t PerformGetLength () const
 
virtual uint64_t PerformGetEntryPoint () const
 
virtual bool PerformIsExecutable () const
 
virtual BNEndianness PerformGetDefaultEndianness () const
 
virtual bool PerformIsRelocatable () const
 
virtual size_t PerformGetAddressSize () const
 
virtual bool PerformSave (FileAccessor *file)
 
void PerformDefineRelocation (Architecture *arch, BNRelocationInfo &info, uint64_t target, uint64_t reloc)
 
void PerformDefineRelocation (Architecture *arch, BNRelocationInfo &info, Ref< Symbol > sym, uint64_t reloc)
 
void NotifyDataWritten (uint64_t offset, size_t len)
 
void NotifyDataInserted (uint64_t offset, size_t len)
 
void NotifyDataRemoved (uint64_t offset, uint64_t len)
 

Protected Attributes

Ref< FileMetadatam_file
 The underlying file. More...
 

Additional Inherited Members

- Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNBinaryView, BNNewViewReference, BNFreeBinaryView >
std::atomic< int > m_refs
 
bool m_registeredRef
 
BNBinaryView * m_object
 

Constructor & Destructor Documentation

◆ BinaryView() [1/2]

BinaryView::BinaryView ( const std::string &  typeName,
FileMetadata file,
BinaryView parentView = nullptr 
)
protected

BinaryView constructor.

Parameters
typeNamename of the BinaryView (e.g. ELF, PE, Mach-O, ...)
filea file to create a view from
parentViewoptional view that contains the raw data used by this view

◆ BinaryView() [2/2]

BinaryView::BinaryView ( BNBinaryView *  view)

Member Function Documentation

◆ AbortAnalysis()

void BinaryView::AbortAnalysis ( )

◆ AddAnalysisCompletionEvent()

Ref< AnalysisCompletionEvent > BinaryView::AddAnalysisCompletionEvent ( const std::function< void()> &  callback)

◆ AddAnalysisOption()

void BinaryView::AddAnalysisOption ( const std::string &  name)

◆ AddAutoDataTag()

void BinaryView::AddAutoDataTag ( uint64_t  addr,
Ref< Tag tag 
)

◆ AddAutoSection()

void BinaryView::AddAutoSection ( const std::string &  name,
uint64_t  start,
uint64_t  length,
BNSectionSemantics  semantics = DefaultSectionSemantics,
const std::string &  type = "",
uint64_t  align = 1,
uint64_t  entrySize = 0,
const std::string &  linkedSection = "",
const std::string &  infoSection = "",
uint64_t  infoData = 0 
)

◆ AddAutoSegment()

void BinaryView::AddAutoSegment ( uint64_t  start,
uint64_t  length,
uint64_t  dataOffset,
uint64_t  dataLength,
uint32_t  flags 
)

◆ AddEntryPointForAnalysis()

void BinaryView::AddEntryPointForAnalysis ( Platform platform,
uint64_t  start 
)

◆ AddFunctionForAnalysis()

void BinaryView::AddFunctionForAnalysis ( Platform platform,
uint64_t  addr 
)

◆ AddTag()

void BinaryView::AddTag ( Ref< Tag tag,
bool  user = false 
)

◆ AddTagType()

void BinaryView::AddTagType ( Ref< TagType tagType)

◆ AddUndoAction()

void BinaryNinja::BinaryView::AddUndoAction ( UndoAction action)

◆ AddUserDataReference()

void BinaryView::AddUserDataReference ( uint64_t  fromAddr,
uint64_t  toAddr 
)

◆ AddUserDataTag()

void BinaryView::AddUserDataTag ( uint64_t  addr,
Ref< Tag tag 
)

◆ AddUserSection()

void BinaryView::AddUserSection ( const std::string &  name,
uint64_t  start,
uint64_t  length,
BNSectionSemantics  semantics = DefaultSectionSemantics,
const std::string &  type = "",
uint64_t  align = 1,
uint64_t  entrySize = 0,
const std::string &  linkedSection = "",
const std::string &  infoSection = "",
uint64_t  infoData = 0 
)

◆ AddUserSegment()

void BinaryView::AddUserSegment ( uint64_t  start,
uint64_t  length,
uint64_t  dataOffset,
uint64_t  dataLength,
uint32_t  flags 
)

◆ AlwaysBranch()

bool BinaryView::AlwaysBranch ( Architecture arch,
uint64_t  addr 
)

◆ BeginBulkModifySymbols()

void BinaryView::BeginBulkModifySymbols ( )

◆ BeginUndoActions()

void BinaryView::BeginUndoActions ( )

◆ CanAssemble()

bool BinaryView::CanAssemble ( Architecture arch)

◆ CommitUndoActions()

void BinaryView::CommitUndoActions ( )

◆ ConvertToNop()

bool BinaryView::ConvertToNop ( Architecture arch,
uint64_t  addr 
)

◆ CreateAutoDataTag() [1/2]

Ref< Tag > BinaryView::CreateAutoDataTag ( uint64_t  addr,
const std::string &  tagTypeName,
const std::string &  data,
bool  unique = false 
)

◆ CreateAutoDataTag() [2/2]

Ref< Tag > BinaryView::CreateAutoDataTag ( uint64_t  addr,
Ref< TagType tagType,
const std::string &  data,
bool  unique = false 
)

◆ CreateDatabase() [1/2]

bool BinaryNinja::BinaryView::CreateDatabase ( const std::string &  path,
const std::function< bool(size_t progress, size_t total)> &  progressCallback,
Ref< SaveSettings settings = new SaveSettings() 
)

◆ CreateDatabase() [2/2]

bool BinaryNinja::BinaryView::CreateDatabase ( const std::string &  path,
Ref< SaveSettings settings = new SaveSettings() 
)

◆ CreateLogger()

Ref< Logger > BinaryView::CreateLogger ( const std::string &  name)

◆ CreateStructureBasedOnFieldAccesses()

Ref< Structure > BinaryNinja::BinaryView::CreateStructureBasedOnFieldAccesses ( const QualifiedName type)

◆ CreateStructureFromOffsetAccess()

Ref< Structure > BinaryView::CreateStructureFromOffsetAccess ( const QualifiedName type,
bool *  newMemberAdded 
) const

◆ CreateStructureMemberFromAccess()

Confidence< Ref< Type > > BinaryView::CreateStructureMemberFromAccess ( const QualifiedName name,
uint64_t  offset 
) const

◆ CreateUserDataTag() [1/2]

Ref< Tag > BinaryView::CreateUserDataTag ( uint64_t  addr,
const std::string &  tagTypeName,
const std::string &  data,
bool  unique = false 
)

◆ CreateUserDataTag() [2/2]

Ref< Tag > BinaryView::CreateUserDataTag ( uint64_t  addr,
Ref< TagType tagType,
const std::string &  data,
bool  unique = false 
)

◆ CreateUserFunction()

void BinaryView::CreateUserFunction ( Platform platform,
uint64_t  start 
)

◆ DefineAutoSymbol()

void BinaryView::DefineAutoSymbol ( Ref< Symbol sym)

◆ DefineAutoSymbolAndVariableOrFunction()

Ref< Symbol > BinaryView::DefineAutoSymbolAndVariableOrFunction ( Ref< Platform platform,
Ref< Symbol sym,
Ref< Type type 
)

◆ DefineDataVariable()

void BinaryView::DefineDataVariable ( uint64_t  addr,
const Confidence< Ref< Type > > &  type 
)

◆ DefineImportedFunction()

void BinaryView::DefineImportedFunction ( Ref< Symbol importAddressSym,
Ref< Function func,
Ref< Type type = nullptr 
)

◆ DefineRelocation() [1/2]

void BinaryView::DefineRelocation ( Architecture arch,
BNRelocationInfo info,
Ref< Symbol target,
uint64_t  reloc 
)

◆ DefineRelocation() [2/2]

void BinaryView::DefineRelocation ( Architecture arch,
BNRelocationInfo info,
uint64_t  target,
uint64_t  reloc 
)

◆ DefineType()

QualifiedName BinaryView::DefineType ( const std::string &  id,
const QualifiedName defaultName,
Ref< Type type 
)

◆ DefineTypes()

void BinaryView::DefineTypes ( const std::vector< std::pair< std::string, QualifiedNameAndType > > &  types,
std::function< bool(size_t, size_t)>  progress = {} 
)

◆ DefineUserDataVariable()

void BinaryView::DefineUserDataVariable ( uint64_t  addr,
const Confidence< Ref< Type > > &  type 
)

◆ DefineUserSymbol()

void BinaryView::DefineUserSymbol ( Ref< Symbol sym)

◆ DefineUserType()

void BinaryView::DefineUserType ( const QualifiedName name,
Ref< Type type 
)

◆ DefineUserTypes()

void BinaryView::DefineUserTypes ( const std::vector< QualifiedNameAndType > &  types,
std::function< bool(size_t, size_t)>  progress = {} 
)

◆ EndBulkModifySymbols()

void BinaryView::EndBulkModifySymbols ( )

◆ FindAllConstant()

bool BinaryView::FindAllConstant ( uint64_t  start,
uint64_t  end,
uint64_t  constant,
Ref< DisassemblySettings settings,
BNFunctionGraphType  graph,
const std::function< bool(size_t current, size_t total)> &  progress,
const std::function< bool(uint64_t addr, const LinearDisassemblyLine &line)> &  matchCallback 
)

◆ FindAllData()

bool BinaryView::FindAllData ( uint64_t  start,
uint64_t  end,
const DataBuffer data,
BNFindFlag  flags,
const std::function< bool(size_t current, size_t total)> &  progress,
const std::function< bool(uint64_t addr, const DataBuffer &match)> &  matchCallback 
)

◆ FindAllText()

bool BinaryView::FindAllText ( uint64_t  start,
uint64_t  end,
const std::string &  data,
Ref< DisassemblySettings settings,
BNFindFlag  flags,
BNFunctionGraphType  graph,
const std::function< bool(size_t current, size_t total)> &  progress,
const std::function< bool(uint64_t addr, const std::string &match, const LinearDisassemblyLine &line)> &  matchCallback 
)

◆ FindNextConstant() [1/2]

bool BinaryView::FindNextConstant ( uint64_t  start,
uint64_t  constant,
uint64_t &  result,
Ref< DisassemblySettings settings,
BNFunctionGraphType  graph = NormalFunctionGraph 
)

◆ FindNextConstant() [2/2]

bool BinaryView::FindNextConstant ( uint64_t  start,
uint64_t  end,
uint64_t  constant,
uint64_t &  addr,
Ref< DisassemblySettings settings,
BNFunctionGraphType  graph,
const std::function< bool(size_t current, size_t total)> &  progress 
)

◆ FindNextData() [1/2]

bool BinaryView::FindNextData ( uint64_t  start,
const DataBuffer data,
uint64_t &  result,
BNFindFlag  flags = FindCaseSensitive 
)

◆ FindNextData() [2/2]

bool BinaryView::FindNextData ( uint64_t  start,
uint64_t  end,
const DataBuffer data,
uint64_t &  addr,
BNFindFlag  flags,
const std::function< bool(size_t current, size_t total)> &  progress 
)

◆ FindNextText() [1/2]

bool BinaryView::FindNextText ( uint64_t  start,
const std::string &  data,
uint64_t &  result,
Ref< DisassemblySettings settings,
BNFindFlag  flags = FindCaseSensitive,
BNFunctionGraphType  graph = NormalFunctionGraph 
)

◆ FindNextText() [2/2]

bool BinaryView::FindNextText ( uint64_t  start,
uint64_t  end,
const std::string &  data,
uint64_t &  addr,
Ref< DisassemblySettings settings,
BNFindFlag  flags,
BNFunctionGraphType  graph,
const std::function< bool(size_t current, size_t total)> &  progress 
)

◆ GetAddressForDataOffset()

bool BinaryView::GetAddressForDataOffset ( uint64_t  offset,
uint64_t &  addr 
)

◆ GetAddressInput() [1/2]

bool BinaryNinja::BinaryView::GetAddressInput ( uint64_t &  result,
const std::string &  prompt,
const std::string &  title 
)

◆ GetAddressInput() [2/2]

bool BinaryNinja::BinaryView::GetAddressInput ( uint64_t &  result,
const std::string &  prompt,
const std::string &  title,
uint64_t  currentAddress 
)

◆ GetAddressSize()

size_t BinaryView::GetAddressSize ( ) const

◆ GetAllAddressTagReferences()

std::vector< TagReference > BinaryView::GetAllAddressTagReferences ( )

◆ GetAllFieldsReferenced()

vector< uint64_t > BinaryView::GetAllFieldsReferenced ( const QualifiedName type)

◆ GetAllFunctionTagReferences()

std::vector< TagReference > BinaryView::GetAllFunctionTagReferences ( )

◆ GetAllocatedRanges()

vector< BNAddressRange > BinaryView::GetAllocatedRanges ( )

◆ GetAllSizesReferenced()

std::map< uint64_t, std::vector< size_t > > BinaryView::GetAllSizesReferenced ( const QualifiedName type)

◆ GetAllTagReferences()

std::vector< TagReference > BinaryView::GetAllTagReferences ( )

◆ GetAllTagReferencesOfType()

std::vector< TagReference > BinaryView::GetAllTagReferencesOfType ( Ref< TagType tagType)

◆ GetAllTagReferencesOfTypeCount()

size_t BinaryView::GetAllTagReferencesOfTypeCount ( Ref< TagType tagType)

◆ GetAllTagReferenceTypeCounts()

std::map< Ref< TagType >, size_t > BinaryView::GetAllTagReferenceTypeCounts ( )

◆ GetAllTypesReferenced()

std::map< uint64_t, std::vector< Confidence< Ref< Type > > > > BinaryView::GetAllTypesReferenced ( const QualifiedName type)

◆ GetAnalysisEntryPoint()

Ref< Function > BinaryView::GetAnalysisEntryPoint ( )

◆ GetAnalysisFunction()

Ref< Function > BinaryView::GetAnalysisFunction ( Platform platform,
uint64_t  addr 
)

◆ GetAnalysisFunctionList()

vector< Ref< Function > > BinaryView::GetAnalysisFunctionList ( )

◆ GetAnalysisFunctionsContainingAddress()

vector< Ref< Function > > BinaryView::GetAnalysisFunctionsContainingAddress ( uint64_t  addr)

◆ GetAnalysisFunctionsForAddress()

vector< Ref< Function > > BinaryView::GetAnalysisFunctionsForAddress ( uint64_t  addr)

◆ GetAnalysisInfo()

AnalysisInfo BinaryView::GetAnalysisInfo ( )

◆ GetAnalysisProgress()

BNAnalysisProgress BinaryView::GetAnalysisProgress ( )

◆ GetAutoDataTagReferences()

std::vector< TagReference > BinaryView::GetAutoDataTagReferences ( )

◆ GetAutoDataTags()

std::vector< Ref< Tag > > BinaryView::GetAutoDataTags ( uint64_t  addr)

◆ GetAutoDataTagsInRange()

std::vector< TagReference > BinaryView::GetAutoDataTagsInRange ( uint64_t  start,
uint64_t  end 
)

◆ GetAutoDataTagsOfType()

std::vector< Ref< Tag > > BinaryView::GetAutoDataTagsOfType ( uint64_t  addr,
Ref< TagType tagType 
)

◆ GetBackgroundAnalysisTask()

Ref< BackgroundTask > BinaryView::GetBackgroundAnalysisTask ( )

◆ GetBasicBlocksForAddress()

vector< Ref< BasicBlock > > BinaryView::GetBasicBlocksForAddress ( uint64_t  addr)

◆ GetBasicBlocksStartingAtAddress()

vector< Ref< BasicBlock > > BinaryView::GetBasicBlocksStartingAtAddress ( uint64_t  addr)

◆ GetCallees()

vector< uint64_t > BinaryView::GetCallees ( ReferenceSource  addr)

◆ GetCallers()

vector< ReferenceSource > BinaryView::GetCallers ( uint64_t  addr)

◆ GetCodeReferences() [1/2]

vector< ReferenceSource > BinaryView::GetCodeReferences ( uint64_t  addr)

◆ GetCodeReferences() [2/2]

vector< ReferenceSource > BinaryView::GetCodeReferences ( uint64_t  addr,
uint64_t  len 
)

◆ GetCodeReferencesForType()

vector< ReferenceSource > BinaryView::GetCodeReferencesForType ( const QualifiedName type)

◆ GetCodeReferencesForTypeField()

vector< TypeFieldReference > BinaryView::GetCodeReferencesForTypeField ( const QualifiedName type,
uint64_t  offset 
)

◆ GetCodeReferencesForTypeFieldFrom() [1/2]

vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFieldFrom ( ReferenceSource  src)

◆ GetCodeReferencesForTypeFieldFrom() [2/2]

vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFieldFrom ( ReferenceSource  src,
uint64_t  len 
)

◆ GetCodeReferencesForTypeFrom() [1/2]

vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFrom ( ReferenceSource  src)

◆ GetCodeReferencesForTypeFrom() [2/2]

vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFrom ( ReferenceSource  src,
uint64_t  len 
)

◆ GetCodeReferencesFrom() [1/2]

vector< uint64_t > BinaryView::GetCodeReferencesFrom ( ReferenceSource  src)

◆ GetCodeReferencesFrom() [2/2]

vector< uint64_t > BinaryView::GetCodeReferencesFrom ( ReferenceSource  src,
uint64_t  len 
)

◆ GetCommentedAddresses()

vector< uint64_t > BinaryView::GetCommentedAddresses ( ) const

◆ GetCommentForAddress()

string BinaryView::GetCommentForAddress ( uint64_t  addr) const

◆ GetCurrentOffset()

uint64_t BinaryView::GetCurrentOffset ( )

◆ GetCurrentView()

string BinaryView::GetCurrentView ( )

◆ GetDataReferences() [1/2]

vector< uint64_t > BinaryView::GetDataReferences ( uint64_t  addr)

◆ GetDataReferences() [2/2]

vector< uint64_t > BinaryView::GetDataReferences ( uint64_t  addr,
uint64_t  len 
)

◆ GetDataReferencesForType()

vector< uint64_t > BinaryView::GetDataReferencesForType ( const QualifiedName type)

◆ GetDataReferencesForTypeField()

vector< uint64_t > BinaryView::GetDataReferencesForTypeField ( const QualifiedName type,
uint64_t  offset 
)

◆ GetDataReferencesFrom() [1/2]

vector< uint64_t > BinaryView::GetDataReferencesFrom ( uint64_t  addr)

◆ GetDataReferencesFrom() [2/2]

vector< uint64_t > BinaryView::GetDataReferencesFrom ( uint64_t  addr,
uint64_t  len 
)

◆ GetDataTagReferences()

std::vector< TagReference > BinaryView::GetDataTagReferences ( )

◆ GetDataTags()

std::vector< Ref< Tag > > BinaryView::GetDataTags ( uint64_t  addr)

◆ GetDataTagsInRange()

std::vector< TagReference > BinaryView::GetDataTagsInRange ( uint64_t  start,
uint64_t  end 
)

◆ GetDataTagsOfType()

std::vector< Ref< Tag > > BinaryView::GetDataTagsOfType ( uint64_t  addr,
Ref< TagType tagType 
)

◆ GetDataVariableAtAddress()

bool BinaryView::GetDataVariableAtAddress ( uint64_t  addr,
DataVariable var 
)

◆ GetDataVariables()

map< uint64_t, DataVariable > BinaryView::GetDataVariables ( )

◆ GetDefaultArchitecture()

Ref< Architecture > BinaryView::GetDefaultArchitecture ( ) const

◆ GetDefaultEndianness()

BNEndianness BinaryView::GetDefaultEndianness ( ) const

◆ GetDefaultPlatform()

Ref< Platform > BinaryView::GetDefaultPlatform ( ) const

◆ GetEnd()

uint64_t BinaryView::GetEnd ( ) const

◆ GetEntropy()

vector< float > BinaryView::GetEntropy ( uint64_t  offset,
size_t  len,
size_t  blockSize 
)

◆ GetEntryPoint()

uint64_t BinaryView::GetEntryPoint ( ) const

◆ GetExternalNameSpace()

NameSpace BinaryView::GetExternalNameSpace ( )
static

◆ GetFile()

FileMetadata * BinaryNinja::BinaryView::GetFile ( ) const
inline

◆ GetInstructionLength()

size_t BinaryView::GetInstructionLength ( Architecture arch,
uint64_t  addr 
)

◆ GetInternalNameSpace()

NameSpace BinaryView::GetInternalNameSpace ( )
static

◆ GetLength()

uint64_t BinaryView::GetLength ( ) const

◆ GetLoadSettings()

Ref< Settings > BinaryView::GetLoadSettings ( const std::string &  typeName)

◆ GetLoadSettingsTypeNames()

vector< string > BinaryView::GetLoadSettingsTypeNames ( )

◆ GetMaxFunctionSizeForAnalysis()

uint64_t BinaryView::GetMaxFunctionSizeForAnalysis ( )

◆ GetModification() [1/2]

BNModificationStatus BinaryView::GetModification ( uint64_t  offset)

◆ GetModification() [2/2]

vector< BNModificationStatus > BinaryView::GetModification ( uint64_t  offset,
size_t  len 
)

◆ GetNameSpaces()

set< NameSpace > BinaryView::GetNameSpaces ( ) const

◆ GetNewAutoFunctionAnalysisSuppressed()

bool BinaryView::GetNewAutoFunctionAnalysisSuppressed ( )

◆ GetNextBasicBlockStartAfterAddress()

uint64_t BinaryView::GetNextBasicBlockStartAfterAddress ( uint64_t  addr)

◆ GetNextDataAfterAddress()

uint64_t BinaryView::GetNextDataAfterAddress ( uint64_t  addr)

◆ GetNextDataVariableStartAfterAddress()

uint64_t BinaryView::GetNextDataVariableStartAfterAddress ( uint64_t  addr)

◆ GetNextFunctionStartAfterAddress()

uint64_t BinaryView::GetNextFunctionStartAfterAddress ( uint64_t  addr)

◆ GetNextValidOffset()

uint64_t BinaryView::GetNextValidOffset ( uint64_t  offset) const

◆ GetParametersForAnalysis()

BNAnalysisParameters BinaryView::GetParametersForAnalysis ( )

◆ GetParentView()

Ref< BinaryView > BinaryView::GetParentView ( ) const

◆ GetPreviousBasicBlockEndBeforeAddress()

uint64_t BinaryView::GetPreviousBasicBlockEndBeforeAddress ( uint64_t  addr)

◆ GetPreviousBasicBlockStartBeforeAddress()

uint64_t BinaryView::GetPreviousBasicBlockStartBeforeAddress ( uint64_t  addr)

◆ GetPreviousDataBeforeAddress()

uint64_t BinaryView::GetPreviousDataBeforeAddress ( uint64_t  addr)

◆ GetPreviousDataVariableStartBeforeAddress()

uint64_t BinaryView::GetPreviousDataVariableStartBeforeAddress ( uint64_t  addr)

◆ GetPreviousFunctionStartBeforeAddress()

uint64_t BinaryView::GetPreviousFunctionStartBeforeAddress ( uint64_t  addr)

◆ GetRawMetadata()

vector< uint8_t > BinaryView::GetRawMetadata ( const std::string &  key)

◆ GetRecentAnalysisFunctionForAddress()

Ref< Function > BinaryView::GetRecentAnalysisFunctionForAddress ( uint64_t  addr)

◆ GetRecentBasicBlockForAddress()

Ref< BasicBlock > BinaryView::GetRecentBasicBlockForAddress ( uint64_t  addr)

◆ GetRelocationRanges()

vector< pair< uint64_t, uint64_t > > BinaryView::GetRelocationRanges ( ) const

◆ GetRelocationRangesAtAddress()

vector< pair< uint64_t, uint64_t > > BinaryView::GetRelocationRangesAtAddress ( uint64_t  addr) const

◆ GetSectionByName()

Ref< Section > BinaryView::GetSectionByName ( const std::string &  name)

◆ GetSections()

vector< Ref< Section > > BinaryView::GetSections ( )

◆ GetSectionsAt()

vector< Ref< Section > > BinaryView::GetSectionsAt ( uint64_t  addr)

◆ GetSegmentAt()

Ref< Segment > BinaryView::GetSegmentAt ( uint64_t  addr)

◆ GetSegments()

vector< Ref< Segment > > BinaryView::GetSegments ( )

◆ GetSizesReferenced()

std::vector< size_t > BinaryView::GetSizesReferenced ( const QualifiedName type,
uint64_t  offset 
)

◆ GetStart()

uint64_t BinaryView::GetStart ( ) const

◆ GetStringAtAddress()

bool BinaryView::GetStringAtAddress ( uint64_t  addr,
BNStringReference strRef 
)

◆ GetStringMetadata()

string BinaryView::GetStringMetadata ( const std::string &  key)

◆ GetStrings() [1/2]

vector< BNStringReference > BinaryView::GetStrings ( )

◆ GetStrings() [2/2]

vector< BNStringReference > BinaryView::GetStrings ( uint64_t  start,
uint64_t  len 
)

◆ GetSymbolByAddress()

Ref< Symbol > BinaryView::GetSymbolByAddress ( uint64_t  addr,
const NameSpace nameSpace = NameSpace() 
)

◆ GetSymbolByRawName()

Ref< Symbol > BinaryView::GetSymbolByRawName ( const std::string &  name,
const NameSpace nameSpace = NameSpace() 
)

◆ GetSymbols() [1/2]

vector< Ref< Symbol > > BinaryView::GetSymbols ( const NameSpace nameSpace = NameSpace())

◆ GetSymbols() [2/2]

vector< Ref< Symbol > > BinaryView::GetSymbols ( uint64_t  start,
uint64_t  len,
const NameSpace nameSpace = NameSpace() 
)

◆ GetSymbolsByName()

vector< Ref< Symbol > > BinaryView::GetSymbolsByName ( const std::string &  name,
const NameSpace nameSpace = NameSpace() 
)

◆ GetSymbolsOfType() [1/2]

vector< Ref< Symbol > > BinaryView::GetSymbolsOfType ( BNSymbolType  type,
const NameSpace nameSpace = NameSpace() 
)

◆ GetSymbolsOfType() [2/2]

vector< Ref< Symbol > > BinaryView::GetSymbolsOfType ( BNSymbolType  type,
uint64_t  start,
uint64_t  len,
const NameSpace nameSpace = NameSpace() 
)

◆ GetTag()

Ref< Tag > BinaryView::GetTag ( const std::string &  tagId)

◆ GetTagReferencesOfType()

std::vector< TagReference > BinaryView::GetTagReferencesOfType ( Ref< TagType tagType)

◆ GetTagReferencesOfTypeCount()

size_t BinaryView::GetTagReferencesOfTypeCount ( Ref< TagType tagType)

◆ GetTagType() [1/2]

Ref< TagType > BinaryView::GetTagType ( const std::string &  name)

◆ GetTagType() [2/2]

Ref< TagType > BinaryView::GetTagType ( const std::string &  name,
TagType::Type  type 
)

◆ GetTagTypeById() [1/2]

Ref< TagType > BinaryView::GetTagTypeById ( const std::string &  id)

◆ GetTagTypeById() [2/2]

Ref< TagType > BinaryView::GetTagTypeById ( const std::string &  id,
TagType::Type  type 
)

◆ GetTagTypeByName() [1/2]

Ref< TagType > BinaryView::GetTagTypeByName ( const std::string &  name)

◆ GetTagTypeByName() [2/2]

Ref< TagType > BinaryView::GetTagTypeByName ( const std::string &  name,
TagType::Type  type 
)

◆ GetTagTypes()

std::vector< Ref< TagType > > BinaryView::GetTagTypes ( )

◆ GetTypeById()

Ref< Type > BinaryView::GetTypeById ( const std::string &  id)

◆ GetTypeByName()

Ref< Type > BinaryView::GetTypeByName ( const QualifiedName name)

◆ GetTypeId()

string BinaryView::GetTypeId ( const QualifiedName name)

◆ GetTypeName()

string BinaryView::GetTypeName ( ) const

◆ GetTypeNameById()

QualifiedName BinaryView::GetTypeNameById ( const std::string &  id)

◆ GetTypeNames()

vector< QualifiedName > BinaryView::GetTypeNames ( const std::string &  matching = "")

◆ GetTypeReferencesForType()

vector< TypeReferenceSource > BinaryView::GetTypeReferencesForType ( const QualifiedName type)

◆ GetTypeReferencesForTypeField()

vector< TypeReferenceSource > BinaryView::GetTypeReferencesForTypeField ( const QualifiedName type,
uint64_t  offset 
)

◆ GetTypes()

map< QualifiedName, Ref< Type > > BinaryView::GetTypes ( )

◆ GetTypesReferenced()

std::vector< Confidence< Ref< Type > > > BinaryView::GetTypesReferenced ( const QualifiedName type,
uint64_t  offset 
)

◆ GetUIntMetadata()

uint64_t BinaryView::GetUIntMetadata ( const std::string &  key)

◆ GetUniqueSectionNames()

vector< string > BinaryView::GetUniqueSectionNames ( const std::vector< std::string > &  names)

◆ GetUserDataTagReferences()

std::vector< TagReference > BinaryView::GetUserDataTagReferences ( )

◆ GetUserDataTags()

std::vector< Ref< Tag > > BinaryView::GetUserDataTags ( uint64_t  addr)

◆ GetUserDataTagsInRange()

std::vector< TagReference > BinaryView::GetUserDataTagsInRange ( uint64_t  start,
uint64_t  end 
)

◆ GetUserDataTagsOfType()

std::vector< Ref< Tag > > BinaryView::GetUserDataTagsOfType ( uint64_t  addr,
Ref< TagType tagType 
)

◆ GetVisibleSymbols()

std::vector< Ref< Symbol > > BinaryView::GetVisibleSymbols ( const NameSpace nameSpace = NameSpace())

◆ GetWorkflow()

Ref< Workflow > BinaryView::GetWorkflow ( ) const

◆ HasDataVariables()

bool BinaryView::HasDataVariables ( ) const

◆ HasFunctions()

bool BinaryView::HasFunctions ( ) const

◆ HasInitialAnalysis()

bool BinaryView::HasInitialAnalysis ( )

◆ HasSymbols()

bool BinaryView::HasSymbols ( ) const

◆ Init()

virtual bool BinaryNinja::BinaryView::Init ( )
inlinevirtual

◆ Insert()

size_t BinaryView::Insert ( uint64_t  offset,
const void *  data,
size_t  len 
)

◆ InsertBuffer()

size_t BinaryView::InsertBuffer ( uint64_t  offset,
const DataBuffer data 
)

◆ InvertBranch()

bool BinaryView::InvertBranch ( Architecture arch,
uint64_t  addr 
)

◆ IsAlwaysBranchPatchAvailable()

bool BinaryView::IsAlwaysBranchPatchAvailable ( Architecture arch,
uint64_t  addr 
)

◆ IsAnalysisChanged()

bool BinaryView::IsAnalysisChanged ( ) const

◆ IsExecutable()

bool BinaryView::IsExecutable ( ) const

◆ IsInvertBranchPatchAvailable()

bool BinaryView::IsInvertBranchPatchAvailable ( Architecture arch,
uint64_t  addr 
)

◆ IsModified()

bool BinaryView::IsModified ( ) const

◆ IsNeverBranchPatchAvailable()

bool BinaryView::IsNeverBranchPatchAvailable ( Architecture arch,
uint64_t  addr 
)

◆ IsOffsetBackedByFile()

bool BinaryView::IsOffsetBackedByFile ( uint64_t  offset) const

◆ IsOffsetCodeSemantics()

bool BinaryView::IsOffsetCodeSemantics ( uint64_t  offset) const

◆ IsOffsetExecutable()

bool BinaryView::IsOffsetExecutable ( uint64_t  offset) const

◆ IsOffsetExternSemantics()

bool BinaryView::IsOffsetExternSemantics ( uint64_t  offset) const

◆ IsOffsetReadable()

bool BinaryView::IsOffsetReadable ( uint64_t  offset) const

◆ IsOffsetWritable()

bool BinaryView::IsOffsetWritable ( uint64_t  offset) const

◆ IsOffsetWritableSemantics()

bool BinaryView::IsOffsetWritableSemantics ( uint64_t  offset) const

◆ IsRelocatable()

bool BinaryView::IsRelocatable ( ) const

◆ IsSkipAndReturnValuePatchAvailable()

bool BinaryView::IsSkipAndReturnValuePatchAvailable ( Architecture arch,
uint64_t  addr 
)

◆ IsSkipAndReturnZeroPatchAvailable()

bool BinaryView::IsSkipAndReturnZeroPatchAvailable ( Architecture arch,
uint64_t  addr 
)

◆ IsTypeAutoDefined()

bool BinaryView::IsTypeAutoDefined ( const QualifiedName name)

◆ IsValidOffset()

bool BinaryView::IsValidOffset ( uint64_t  offset) const

◆ Navigate()

bool BinaryView::Navigate ( const std::string &  view,
uint64_t  offset 
)

◆ NotifyDataInserted()

void BinaryView::NotifyDataInserted ( uint64_t  offset,
size_t  len 
)
protected

◆ NotifyDataRemoved()

void BinaryView::NotifyDataRemoved ( uint64_t  offset,
uint64_t  len 
)
protected

◆ NotifyDataWritten()

void BinaryView::NotifyDataWritten ( uint64_t  offset,
size_t  len 
)
protected

◆ ParseExpression()

bool BinaryView::ParseExpression ( Ref< BinaryView view,
const std::string &  expression,
uint64_t &  offset,
uint64_t  here,
std::string &  errorString 
)
static

◆ ParsePossibleValueSet()

bool BinaryView::ParsePossibleValueSet ( const std::string &  value,
BNRegisterValueType  state,
PossibleValueSet result,
uint64_t  here,
std::string &  errors 
)

◆ ParseTypesFromSource()

bool BinaryView::ParseTypesFromSource ( const std::string &  text,
const std::vector< std::string > &  options,
const std::vector< std::string > &  includeDirs,
TypeParserResult result,
std::string &  errors,
const std::set< QualifiedName > &  typesAllowRedefinition = {} 
)

◆ ParseTypeString() [1/2]

bool BinaryNinja::BinaryView::ParseTypeString ( const std::string &  text,
QualifiedNameAndType result,
std::string &  errors,
const std::set< QualifiedName > &  typesAllowRedefinition = {} 
)

◆ ParseTypeString() [2/2]

bool BinaryNinja::BinaryView::ParseTypeString ( const std::string &  text,
std::map< QualifiedName, Ref< Type > > &  types,
std::map< QualifiedName, Ref< Type > > &  variables,
std::map< QualifiedName, Ref< Type > > &  functions,
std::string &  errors,
const std::set< QualifiedName > &  typesAllowRedefinition = {} 
)

◆ PerformDefineRelocation() [1/2]

void BinaryView::PerformDefineRelocation ( Architecture arch,
BNRelocationInfo info,
Ref< Symbol sym,
uint64_t  reloc 
)
protected

◆ PerformDefineRelocation() [2/2]

void BinaryView::PerformDefineRelocation ( Architecture arch,
BNRelocationInfo info,
uint64_t  target,
uint64_t  reloc 
)
protected

◆ PerformGetAddressSize()

size_t BinaryView::PerformGetAddressSize ( ) const
protectedvirtual

◆ PerformGetDefaultEndianness()

BNEndianness BinaryView::PerformGetDefaultEndianness ( ) const
protectedvirtual

◆ PerformGetEntryPoint()

virtual uint64_t BinaryNinja::BinaryView::PerformGetEntryPoint ( ) const
inlineprotectedvirtual

◆ PerformGetLength()

virtual uint64_t BinaryNinja::BinaryView::PerformGetLength ( ) const
inlineprotectedvirtual

◆ PerformGetModification()

virtual BNModificationStatus BinaryNinja::BinaryView::PerformGetModification ( uint64_t  offset)
inlineprotectedvirtual

◆ PerformGetNextValidOffset()

uint64_t BinaryView::PerformGetNextValidOffset ( uint64_t  offset)
protectedvirtual

◆ PerformGetStart()

virtual uint64_t BinaryNinja::BinaryView::PerformGetStart ( ) const
inlineprotectedvirtual

◆ PerformInsert()

virtual size_t BinaryNinja::BinaryView::PerformInsert ( uint64_t  offset,
const void *  data,
size_t  len 
)
inlineprotectedvirtual

◆ PerformIsExecutable()

virtual bool BinaryNinja::BinaryView::PerformIsExecutable ( ) const
inlineprotectedvirtual

◆ PerformIsOffsetBackedByFile()

bool BinaryView::PerformIsOffsetBackedByFile ( uint64_t  offset)
protectedvirtual

◆ PerformIsOffsetExecutable()

bool BinaryView::PerformIsOffsetExecutable ( uint64_t  offset)
protectedvirtual

◆ PerformIsOffsetReadable()

bool BinaryView::PerformIsOffsetReadable ( uint64_t  offset)
protectedvirtual

◆ PerformIsOffsetWritable()

bool BinaryView::PerformIsOffsetWritable ( uint64_t  offset)
protectedvirtual

◆ PerformIsRelocatable()

bool BinaryView::PerformIsRelocatable ( ) const
protectedvirtual

◆ PerformIsValidOffset()

bool BinaryView::PerformIsValidOffset ( uint64_t  offset)
protectedvirtual

◆ PerformRead()

virtual size_t BinaryNinja::BinaryView::PerformRead ( void *  dest,
uint64_t  offset,
size_t  len 
)
inlineprotectedvirtual

PerformRead provides a mapping between the flat file and virtual offsets in the file.

Parameters
destthe address to write len number of bytes.
offsetthe virtual offset to find and read len bytes from
lenthe number of bytes to read from offset and write to dest

◆ PerformRemove()

virtual size_t BinaryNinja::BinaryView::PerformRemove ( uint64_t  offset,
uint64_t  len 
)
inlineprotectedvirtual

◆ PerformSave()

bool BinaryView::PerformSave ( FileAccessor file)
protectedvirtual

◆ PerformWrite()

virtual size_t BinaryNinja::BinaryView::PerformWrite ( uint64_t  offset,
const void *  data,
size_t  len 
)
inlineprotectedvirtual

◆ QueryMetadata()

Ref< Metadata > BinaryView::QueryMetadata ( const std::string &  key)

◆ RangeContainsRelocation()

bool BinaryView::RangeContainsRelocation ( uint64_t  addr,
size_t  size 
) const

◆ Read()

size_t BinaryView::Read ( void *  dest,
uint64_t  offset,
size_t  len 
)

◆ ReadBuffer()

DataBuffer BinaryView::ReadBuffer ( uint64_t  offset,
size_t  len 
)

◆ Reanalyze()

void BinaryView::Reanalyze ( )

◆ Redo()

bool BinaryView::Redo ( )

◆ RegisterNotification()

void BinaryView::RegisterNotification ( BinaryDataNotification notify)

◆ RegisterPlatformTypes()

void BinaryView::RegisterPlatformTypes ( Platform platform)

◆ Remove()

size_t BinaryView::Remove ( uint64_t  offset,
uint64_t  len 
)

◆ RemoveAnalysisFunction()

void BinaryView::RemoveAnalysisFunction ( Function func)

◆ RemoveAutoDataTag()

void BinaryView::RemoveAutoDataTag ( uint64_t  addr,
Ref< Tag tag 
)

◆ RemoveAutoDataTagsOfType()

void BinaryView::RemoveAutoDataTagsOfType ( uint64_t  addr,
Ref< TagType tagType 
)

◆ RemoveAutoSection()

void BinaryView::RemoveAutoSection ( const std::string &  name)

◆ RemoveAutoSegment()

void BinaryView::RemoveAutoSegment ( uint64_t  start,
uint64_t  length 
)

◆ RemoveMetadata()

void BinaryView::RemoveMetadata ( const std::string &  key)

◆ RemoveTag()

void BinaryView::RemoveTag ( Ref< Tag tag,
bool  user = false 
)

◆ RemoveTagReference()

void BinaryView::RemoveTagReference ( const TagReference ref)

◆ RemoveTagType()

void BinaryView::RemoveTagType ( Ref< TagType tagType)

◆ RemoveUserDataReference()

void BinaryView::RemoveUserDataReference ( uint64_t  fromAddr,
uint64_t  toAddr 
)

◆ RemoveUserDataTag()

void BinaryView::RemoveUserDataTag ( uint64_t  addr,
Ref< Tag tag 
)

◆ RemoveUserDataTagsOfType()

void BinaryView::RemoveUserDataTagsOfType ( uint64_t  addr,
Ref< TagType tagType 
)

◆ RemoveUserFunction()

void BinaryView::RemoveUserFunction ( Function func)

◆ RemoveUserSection()

void BinaryView::RemoveUserSection ( const std::string &  name)

◆ RemoveUserSegment()

void BinaryView::RemoveUserSegment ( uint64_t  start,
uint64_t  length 
)

◆ RenameType()

void BinaryView::RenameType ( const QualifiedName oldName,
const QualifiedName newName 
)

◆ Save() [1/2]

bool BinaryNinja::BinaryView::Save ( const std::string &  path)

◆ Save() [2/2]

bool BinaryView::Save ( FileAccessor file)

◆ SaveAutoSnapshot() [1/2]

bool BinaryNinja::BinaryView::SaveAutoSnapshot ( const std::function< bool(size_t progress, size_t total)> &  progressCallback,
Ref< SaveSettings settings = new SaveSettings() 
)

◆ SaveAutoSnapshot() [2/2]

bool BinaryView::SaveAutoSnapshot ( Ref< SaveSettings settings = new SaveSettings())

◆ SetAnalysisHold()

void BinaryView::SetAnalysisHold ( bool  enable)

◆ SetCommentForAddress()

void BinaryView::SetCommentForAddress ( uint64_t  addr,
const std::string &  comment 
)

◆ SetDefaultArchitecture()

void BinaryView::SetDefaultArchitecture ( Architecture arch)

◆ SetDefaultPlatform()

void BinaryView::SetDefaultPlatform ( Platform platform)

◆ SetLoadSettings()

void BinaryView::SetLoadSettings ( const std::string &  typeName,
Ref< Settings settings 
)

◆ SetMaxFunctionSizeForAnalysis()

void BinaryView::SetMaxFunctionSizeForAnalysis ( uint64_t  size)

◆ SetNewAutoFunctionAnalysisSuppressed()

void BinaryView::SetNewAutoFunctionAnalysisSuppressed ( bool  suppress)

◆ SetParametersForAnalysis()

void BinaryView::SetParametersForAnalysis ( BNAnalysisParameters  params)

◆ ShowGraphReport()

void BinaryView::ShowGraphReport ( const std::string &  title,
FlowGraph graph 
)

◆ ShowHTMLReport()

void BinaryView::ShowHTMLReport ( const std::string &  title,
const std::string &  contents,
const std::string &  plainText 
)

◆ ShowMarkdownReport()

void BinaryView::ShowMarkdownReport ( const std::string &  title,
const std::string &  contents,
const std::string &  plainText 
)

◆ ShowPlainTextReport()

void BinaryView::ShowPlainTextReport ( const std::string &  title,
const std::string &  contents 
)

◆ SkipAndReturnValue()

bool BinaryView::SkipAndReturnValue ( Architecture arch,
uint64_t  addr,
uint64_t  value 
)

◆ StoreMetadata()

void BinaryView::StoreMetadata ( const std::string &  key,
Ref< Metadata value,
bool  isAuto = false 
)

◆ UndefineAutoSymbol()

void BinaryView::UndefineAutoSymbol ( Ref< Symbol sym)

◆ UndefineDataVariable()

void BinaryView::UndefineDataVariable ( uint64_t  addr)

◆ UndefineType()

void BinaryView::UndefineType ( const std::string &  id)

◆ UndefineUserDataVariable()

void BinaryView::UndefineUserDataVariable ( uint64_t  addr)

◆ UndefineUserSymbol()

void BinaryView::UndefineUserSymbol ( Ref< Symbol sym)

◆ UndefineUserType()

void BinaryView::UndefineUserType ( const QualifiedName name)

◆ Undo()

bool BinaryView::Undo ( )

◆ UnregisterNotification()

void BinaryView::UnregisterNotification ( BinaryDataNotification notify)

◆ UpdateAnalysis()

void BinaryView::UpdateAnalysis ( )

◆ UpdateAnalysisAndWait()

void BinaryView::UpdateAnalysisAndWait ( )

◆ Write()

size_t BinaryView::Write ( uint64_t  offset,
const void *  data,
size_t  len 
)

◆ WriteBuffer()

size_t BinaryView::WriteBuffer ( uint64_t  offset,
const DataBuffer data 
)

Member Data Documentation

◆ m_file

Ref<FileMetadata> BinaryNinja::BinaryView::m_file
protected

The underlying file.


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