Classes related to interacting with and implementing custom BinaryViews. More...
Classes related to interacting with and implementing custom BinaryViews.
Classes | |
class | BinaryNinja::Metadata |
class | BinaryNinja::BinaryDataNotification |
class | BinaryNinja::AnalysisCompletionEvent |
struct | BinaryNinja::ActiveAnalysisInfo |
struct | BinaryNinja::AnalysisInfo |
struct | BinaryNinja::DataVariable |
struct | BinaryNinja::DataVariableAndName |
class | BinaryNinja::TagType |
struct | BinaryNinja::TagReference |
class | BinaryNinja::Segment |
The Segment object is returned during BinaryView creation and should not be directly instantiated. More... | |
class | BinaryNinja::Section |
The Section object is returned during BinaryView creation and should not be directly instantiated. More... | |
class | BinaryNinja::BinaryView |
BinaryView implements a view on binary data, and presents a queryable interface of a binary file. More... | |
class | BinaryNinja::Relocation |
class | BinaryNinja::BinaryData |
class | BinaryNinja::BinaryViewType |
The BinaryViewType object is used internally and should not be directly instantiated. More... | |
class | BinaryNinja::CoreBinaryViewType |
class | BinaryNinja::ReadException |
Thrown whenever a read is performed out of bounds. More... | |
class | BinaryNinja::BinaryReader |
BinaryReader is a convenience class for reading binary data. More... | |
class | BinaryNinja::WriteException |
Raised whenever a write is performed out of bounds. More... | |
class | BinaryNinja::BinaryWriter |
BinaryWriter is a convenience class for writing binary data. More... | |
class | BinaryNinja::TypeArchive |
Type Archives are a collection of types which can be shared between different analysis sessions and are backed by a database file on disk. More... | |
class | BinaryNinja::SymbolQueue |
class BinaryNinja::Metadata |
Public Member Functions | |
Metadata (BNMetadata *structuredData) | |
Metadata (bool data) | |
Create a new Metadata object representing a bool. More... | |
Metadata (const std::string &data) | |
Create a new Metadata object representing a string. More... | |
Metadata (uint64_t data) | |
Create a new Metadata object representing a uint64. More... | |
Metadata (int64_t data) | |
Create a new Metadata object representing an int64. More... | |
Metadata (double data) | |
Create a new Metadata object representing a double. More... | |
Metadata (const std::vector< bool > &data) | |
Create a new Metadata object representing a vector of bools. More... | |
Metadata (const std::vector< std::string > &data) | |
Create a new Metadata object representing a vector of strings. More... | |
Metadata (const std::vector< uint64_t > &data) | |
Create a new Metadata object representing a vector of uint64s. More... | |
Metadata (const std::vector< int64_t > &data) | |
Create a new Metadata object representing a vector of int64s. More... | |
Metadata (const std::vector< double > &data) | |
Create a new Metadata object representing a vector of doubles. More... | |
Metadata (const std::vector< uint8_t > &data) | |
Create a new Metadata object representing a vector of bytes to store. More... | |
Metadata (const std::vector< Ref< Metadata > > &data) | |
Create a new Metadata object representing a vector of children Metadata objects. More... | |
Metadata (const std::map< std::string, Ref< Metadata > > &data) | |
Create a new Metadata object representing a map of strings to metadata objects. More... | |
Metadata (MetadataType type) | |
virtual | ~Metadata () |
bool | operator== (const Metadata &rhs) |
Ref< Metadata > | operator[] (const std::string &key) |
Ref< Metadata > | operator[] (size_t idx) |
MetadataType | GetType () const |
bool | GetBoolean () const |
std::string | GetString () const |
uint64_t | GetUnsignedInteger () const |
int64_t | GetSignedInteger () const |
double | GetDouble () const |
std::vector< bool > | GetBooleanList () const |
std::vector< std::string > | GetStringList () const |
std::vector< uint64_t > | GetUnsignedIntegerList () const |
std::vector< int64_t > | GetSignedIntegerList () const |
std::vector< double > | GetDoubleList () const |
std::vector< uint8_t > | GetRaw () const |
std::vector< Ref< Metadata > > | GetArray () const |
std::map< std::string, Ref< Metadata > > | GetKeyValueStore () const |
std::string | GetJsonString () const |
Ref< Metadata > | Get (const std::string &key) |
Get a Metadata object by key. More... | |
bool | SetValueForKey (const std::string &key, Ref< Metadata > data) |
Set the value mapped to by a particular string. More... | |
void | RemoveKey (const std::string &key) |
Remove a key from the map. More... | |
Ref< Metadata > | Get (size_t index) |
Get an item at a given index. More... | |
bool | Append (Ref< Metadata > data) |
Append an item to the array. More... | |
void | RemoveIndex (size_t index) |
Remove an item at a given index. More... | |
size_t | Size () const |
Get the size of the array. More... | |
bool | IsBoolean () const |
bool | IsString () const |
bool | IsUnsignedInteger () const |
bool | IsSignedInteger () const |
bool | IsDouble () const |
bool | IsBooleanList () const |
bool | IsStringList () const |
bool | IsUnsignedIntegerList () const |
bool | IsSignedIntegerList () const |
bool | IsDoubleList () const |
bool | IsRaw () const |
bool | IsArray () const |
bool | IsKeyValueStore () const |
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNMetadata, BNNewMetadataReference, BNFreeMetadata > | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNMetadata * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNMetadata, BNNewMetadataReference, BNFreeMetadata > | |
static BNMetadata * | GetObject (CoreRefCountObject *obj) |
static BNMetadata * | GetObject (const CoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNMetadata, BNNewMetadataReference, BNFreeMetadata > | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNMetadata * | m_object |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
Create a new Metadata object representing a uint64.
data | - uint64 to store |
|
explicit |
Create a new Metadata object representing an int64.
data | - int64 to store |
|
explicit |
Create a new Metadata object representing a double.
data | - double to store |
|
explicit |
Create a new Metadata object representing a vector of bools.
data | - list of bools to store |
|
explicit |
Create a new Metadata object representing a vector of strings.
data | - list of strings to store |
|
explicit |
Create a new Metadata object representing a vector of uint64s.
data | - list of uint64s to store |
|
explicit |
Create a new Metadata object representing a vector of int64s.
data | - list of int64s to store |
|
explicit |
Create a new Metadata object representing a vector of doubles.
data | - list of doubles to store |
|
explicit |
Create a new Metadata object representing a vector of bytes to store.
data | - list of bytes to store |
Create a new Metadata object representing a map of strings to metadata objects.
data | - map of strings to metadata objects |
|
explicit |
|
inlinevirtual |
bool Metadata::operator== | ( | const Metadata & | rhs | ) |
MetadataType Metadata::GetType | ( | ) | const |
bool Metadata::GetBoolean | ( | ) | const |
std::string Metadata::GetString | ( | ) | const |
uint64_t Metadata::GetUnsignedInteger | ( | ) | const |
int64_t Metadata::GetSignedInteger | ( | ) | const |
double Metadata::GetDouble | ( | ) | const |
std::vector< bool > Metadata::GetBooleanList | ( | ) | const |
std::vector< std::string > Metadata::GetStringList | ( | ) | const |
std::vector< uint64_t > Metadata::GetUnsignedIntegerList | ( | ) | const |
std::vector< int64_t > Metadata::GetSignedIntegerList | ( | ) | const |
std::vector< double > Metadata::GetDoubleList | ( | ) | const |
vector< uint8_t > Metadata::GetRaw | ( | ) | const |
std::string Metadata::GetJsonString | ( | ) | const |
Get a Metadata object by key.
Only for if IsKeyValueStore == true
key |
Set the value mapped to by a particular string.
Only for if IsKeyValueStore == true
key | |
data |
void Metadata::RemoveKey | ( | const std::string & | key | ) |
Remove a key from the map.
Only for if IsKeyValueStore == true
key | - Key to remove |
Get an item at a given index.
For array data only
index | Index of the item to retrieve |
Append an item to the array.
For array data only
data | Data to append |
void Metadata::RemoveIndex | ( | size_t | index | ) |
Remove an item at a given index.
For array data only
index | Index of the item to remove |
size_t Metadata::Size | ( | ) | const |
Get the size of the array.
For array data only
bool Metadata::IsBoolean | ( | ) | const |
bool Metadata::IsString | ( | ) | const |
bool Metadata::IsUnsignedInteger | ( | ) | const |
bool Metadata::IsSignedInteger | ( | ) | const |
bool Metadata::IsDouble | ( | ) | const |
bool Metadata::IsBooleanList | ( | ) | const |
bool Metadata::IsStringList | ( | ) | const |
bool Metadata::IsUnsignedIntegerList | ( | ) | const |
bool Metadata::IsSignedIntegerList | ( | ) | const |
bool Metadata::IsDoubleList | ( | ) | const |
bool Metadata::IsRaw | ( | ) | const |
bool Metadata::IsArray | ( | ) | const |
bool Metadata::IsKeyValueStore | ( | ) | const |
class BinaryNinja::BinaryDataNotification |
Public Types | |
enum | NotificationType : uint64_t { NotificationBarrier = 1ULL << 0 , DataWritten = 1ULL << 1 , DataInserted = 1ULL << 2 , DataRemoved = 1ULL << 3 , FunctionAdded = 1ULL << 4 , FunctionRemoved = 1ULL << 5 , FunctionUpdated = 1ULL << 6 , FunctionUpdateRequested = 1ULL << 7 , DataVariableAdded = 1ULL << 8 , DataVariableRemoved = 1ULL << 9 , DataVariableUpdated = 1ULL << 10 , DataMetadataUpdated = 1ULL << 11 , TagTypeUpdated = 1ULL << 12 , TagAdded = 1ULL << 13 , TagRemoved = 1ULL << 14 , TagUpdated = 1ULL << 15 , SymbolAdded = 1ULL << 16 , SymbolRemoved = 1ULL << 17 , SymbolUpdated = 1ULL << 18 , StringFound = 1ULL << 19 , StringRemoved = 1ULL << 20 , TypeDefined = 1ULL << 21 , TypeUndefined = 1ULL << 22 , TypeReferenceChanged = 1ULL << 23 , TypeFieldReferenceChanged = 1ULL << 24 , SegmentAdded = 1ULL << 25 , SegmentRemoved = 1ULL << 26 , SegmentUpdated = 1ULL << 27 , SectionAdded = 1ULL << 28 , SectionRemoved = 1ULL << 29 , SectionUpdated = 1ULL << 30 , ComponentNameUpdated = 1ULL << 31 , ComponentAdded = 1ULL << 32 , ComponentRemoved = 1ULL << 33 , ComponentMoved = 1ULL << 34 , ComponentFunctionAdded = 1ULL << 35 , ComponentFunctionRemoved = 1ULL << 36 , ComponentDataVariableAdded = 1ULL << 37 , ComponentDataVariableRemoved = 1ULL << 38 , ExternalLibraryAdded = 1ULL << 39 , ExternalLibraryRemoved = 1ULL << 40 , ExternalLibraryUpdated = 1ULL << 41 , ExternalLocationAdded = 1ULL << 42 , ExternalLocationRemoved = 1ULL << 43 , ExternalLocationUpdated = 1ULL << 44 , TypeArchiveAttached = 1ULL << 45 , TypeArchiveDetached = 1ULL << 46 , TypeArchiveConnected = 1ULL << 47 , TypeArchiveDisconnected = 1ULL << 48 , UndoEntryAdded = 1ULL << 49 , UndoEntryTaken = 1ULL << 50 , RedoEntryTaken = 1ULL << 51 , Rebased = 1ULL << 52 , BinaryDataUpdates = DataWritten | DataInserted | DataRemoved , FunctionLifetime = FunctionAdded | FunctionRemoved , FunctionUpdates = FunctionLifetime | FunctionUpdated , DataVariableLifetime = DataVariableAdded | DataVariableRemoved , DataVariableUpdates = DataVariableLifetime | DataVariableUpdated , TagLifetime = TagAdded | TagRemoved , TagUpdates = TagLifetime | TagUpdated , SymbolLifetime = SymbolAdded | SymbolRemoved , SymbolUpdates = SymbolLifetime | SymbolUpdated , StringUpdates = StringFound | StringRemoved , TypeLifetime = TypeDefined | TypeUndefined , TypeUpdates = TypeLifetime | TypeReferenceChanged | TypeFieldReferenceChanged , SegmentLifetime = SegmentAdded | SegmentRemoved , SegmentUpdates = SegmentLifetime | SegmentUpdated , SectionLifetime = SectionAdded | SectionRemoved , SectionUpdates = SectionLifetime | SectionUpdated , ComponentUpdates = ComponentNameUpdated | ComponentAdded | ComponentRemoved | ComponentMoved | ComponentFunctionAdded | ComponentFunctionRemoved | ComponentDataVariableAdded | ComponentDataVariableRemoved , ExternalLibraryLifetime = ExternalLibraryAdded | ExternalLibraryRemoved , ExternalLibraryUpdates = ExternalLibraryLifetime | ExternalLibraryUpdated , ExternalLocationLifetime = ExternalLocationAdded | ExternalLocationRemoved , ExternalLocationUpdates = ExternalLocationLifetime | ExternalLocationUpdated , TypeArchiveUpdates = TypeArchiveAttached | TypeArchiveDetached | TypeArchiveConnected | TypeArchiveDisconnected , UndoUpdates = UndoEntryAdded | UndoEntryTaken | RedoEntryTaken } |
using | NotificationTypes = uint64_t |
Public Member Functions | |
BinaryDataNotification () | |
BinaryDataNotification (NotificationTypes notifications) | |
virtual | ~BinaryDataNotification () |
BNBinaryDataNotification * | GetCallbacks () |
virtual uint64_t | OnNotificationBarrier (BinaryView *view) |
virtual void | OnBinaryDataWritten (BinaryView *view, uint64_t offset, size_t len) |
virtual void | OnBinaryDataInserted (BinaryView *view, uint64_t offset, size_t len) |
virtual void | OnBinaryDataRemoved (BinaryView *view, uint64_t offset, uint64_t len) |
virtual void | OnAnalysisFunctionAdded (BinaryView *view, Function *func) |
virtual void | OnAnalysisFunctionRemoved (BinaryView *view, Function *func) |
virtual void | OnAnalysisFunctionUpdated (BinaryView *view, Function *func) |
virtual void | OnAnalysisFunctionUpdateRequested (BinaryView *view, Function *func) |
virtual void | OnDataVariableAdded (BinaryView *view, const DataVariable &var) |
virtual void | OnDataVariableRemoved (BinaryView *view, const DataVariable &var) |
virtual void | OnDataVariableUpdated (BinaryView *view, const DataVariable &var) |
virtual void | OnDataMetadataUpdated (BinaryView *view, uint64_t offset) |
virtual void | OnTagTypeUpdated (BinaryView *view, Ref< TagType > tagTypeRef) |
virtual void | OnTagAdded (BinaryView *view, const TagReference &tagRef) |
virtual void | OnTagRemoved (BinaryView *view, const TagReference &tagRef) |
virtual void | OnTagUpdated (BinaryView *view, const TagReference &tagRef) |
virtual void | OnSymbolAdded (BinaryView *view, Symbol *sym) |
virtual void | OnSymbolRemoved (BinaryView *view, Symbol *sym) |
virtual void | OnSymbolUpdated (BinaryView *view, Symbol *sym) |
virtual void | OnStringFound (BinaryView *data, BNStringType type, uint64_t offset, size_t len) |
virtual void | OnStringRemoved (BinaryView *data, BNStringType type, uint64_t offset, size_t len) |
virtual void | OnTypeDefined (BinaryView *data, const QualifiedName &name, Type *type) |
virtual void | OnTypeUndefined (BinaryView *data, const QualifiedName &name, Type *type) |
virtual void | OnTypeReferenceChanged (BinaryView *data, const QualifiedName &name, Type *type) |
virtual void | OnTypeFieldReferenceChanged (BinaryView *data, const QualifiedName &name, uint64_t offset) |
virtual void | OnSegmentAdded (BinaryView *data, Segment *segment) |
virtual void | OnSegmentRemoved (BinaryView *data, Segment *segment) |
virtual void | OnSegmentUpdated (BinaryView *data, Segment *segment) |
virtual void | OnSectionAdded (BinaryView *data, Section *section) |
virtual void | OnSectionRemoved (BinaryView *data, Section *section) |
virtual void | OnSectionUpdated (BinaryView *data, Section *section) |
virtual void | OnComponentNameUpdated (BinaryView *data, std::string &previousName, Component *component) |
This notification is posted after the display name for a component is updated. More... | |
virtual void | OnComponentAdded (BinaryView *data, Component *component) |
This notification is posted after a Component is added to the tree. More... | |
virtual void | OnComponentRemoved (BinaryView *data, Component *formerParent, Component *component) |
This notification is posted after a Component is removed from the tree. More... | |
virtual void | OnComponentMoved (BinaryView *data, Component *formerParent, Component *newParent, Component *component) |
This notification is posted whenever a component is moved from one component to another. More... | |
virtual void | OnComponentFunctionAdded (BinaryView *data, Component *component, Function *function) |
This notification is posted whenever a Function is added to a Component. More... | |
virtual void | OnComponentFunctionRemoved (BinaryView *data, Component *component, Function *function) |
This notification is posted whenever a Function is removed from a Component. More... | |
virtual void | OnComponentDataVariableAdded (BinaryView *data, Component *component, const DataVariable &var) |
This notification is posted whenever a DataVariable is added to a Component. More... | |
virtual void | OnComponentDataVariableRemoved (BinaryView *data, Component *component, const DataVariable &var) |
This notification is posted whenever a DataVariable is removed from a Component. More... | |
virtual void | OnExternalLibraryAdded (BinaryView *data, ExternalLibrary *library) |
virtual void | OnExternalLibraryRemoved (BinaryView *data, ExternalLibrary *library) |
virtual void | OnExternalLibraryUpdated (BinaryView *data, ExternalLibrary *library) |
virtual void | OnExternalLocationAdded (BinaryView *data, ExternalLocation *location) |
virtual void | OnExternalLocationRemoved (BinaryView *data, ExternalLocation *location) |
virtual void | OnExternalLocationUpdated (BinaryView *data, ExternalLocation *location) |
virtual void | OnTypeArchiveAttached (BinaryView *data, const std::string &id, const std::string &path) |
This notification is posted whenever a Type Archive is attached to a Binary View. More... | |
virtual void | OnTypeArchiveDetached (BinaryView *data, const std::string &id, const std::string &path) |
This notification is posted whenever a Type Archive is detached to a Binary View. More... | |
virtual void | OnTypeArchiveConnected (BinaryView *data, TypeArchive *archive) |
This notification is posted whenever a previously disconnected Type Archive attached to the Binary View is connected. More... | |
virtual void | OnTypeArchiveDisconnected (BinaryView *data, TypeArchive *archive) |
This notification is posted whenever a previously connected Type Archive attached to the Binary View is disconnected. More... | |
virtual void | OnUndoEntryAdded (BinaryView *data, UndoEntry *entry) |
This notification is posted whenever an entry is added to undo history. More... | |
virtual void | OnUndoEntryTaken (BinaryView *data, UndoEntry *entry) |
This notification is posted whenever an action is undone. More... | |
virtual void | OnRedoEntryTaken (BinaryView *data, UndoEntry *entry) |
This notification is posted whenever an action is redone. More... | |
virtual void | OnRebased (BinaryView *oldView, BinaryView *newView) |
This notification is posted whenever a binary view is rebased. More... | |
using BinaryNinja::BinaryDataNotification::NotificationTypes = uint64_t |
enum BinaryNinja::BinaryDataNotification::NotificationType : uint64_t |
BinaryDataNotification::BinaryDataNotification | ( | ) |
BinaryDataNotification::BinaryDataNotification | ( | NotificationTypes | notifications | ) |
|
inlinevirtual |
|
inline |
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in HexEditor, LinearView, SymbolsView, TokenizedTextView, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in HexEditor, LinearView, SymbolsView, TokenizedTextView, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in HexEditor, LinearView, SymbolsView, TokenizedTextView, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in FeatureMap, SymbolListModel, LinearView, NotificationsWorker, and TokenizedTextView.
|
inlinevirtual |
Reimplemented in FeatureMap, SymbolListModel, LinearView, NotificationsWorker, and TokenizedTextView.
|
inlinevirtual |
Reimplemented in FeatureMap, FlowGraphWidget, LinearView, NotificationsWorker, TagList, TokenizedTextView, CrossReferenceTree, and CrossReferenceTable.
|
inlinevirtual |
Reimplemented in FlowGraphWidget, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in FeatureMap, SymbolListModel, LinearView, NotificationsWorker, and TokenizedTextView.
|
inlinevirtual |
Reimplemented in FeatureMap, SymbolListModel, LinearView, NotificationsWorker, and TokenizedTextView.
|
inlinevirtual |
Reimplemented in FeatureMap, LinearView, NotificationsWorker, and TokenizedTextView.
|
inlinevirtual |
Reimplemented in FlowGraphWidget, LinearView, NotificationsWorker, and TokenizedTextView.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in TagListModel, TagList, TagTypeListModel, LinearView, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in TagListModel, TagList, TagTypeListModel, LinearView, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in TagList, FlowGraphWidget, TokenizedTextView, LinearView, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in SymbolListModel, NotificationsWorker, and LinearView.
|
inlinevirtual |
Reimplemented in SymbolListModel, NotificationsWorker, and LinearView.
|
inlinevirtual |
Reimplemented in SymbolListModel, NotificationsWorker, and LinearView.
|
inlinevirtual |
Reimplemented in FeatureMap, StringsListModel, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in FeatureMap, StringsListModel, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in TypeBrowserModel, LinearView, NotificationsWorker, and TypeView.
|
inlinevirtual |
Reimplemented in TypeBrowserModel, LinearView, NotificationsWorker, and TypeView.
|
inlinevirtual |
Reimplemented in TypeBrowserModel, NotificationsWorker, and TypeView.
|
inlinevirtual |
Reimplemented in TypeBrowserModel, NotificationsWorker, and TypeView.
|
inlinevirtual |
Reimplemented in LogItemDelegate, SegmentWidget, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in LogItemDelegate, SegmentWidget, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in LogItemDelegate, SegmentWidget, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in SectionWidget, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in SectionWidget, and NotificationsWorker.
|
inlinevirtual |
Reimplemented in SectionWidget, and NotificationsWorker.
|
inlinevirtual |
This notification is posted after the display name for a component is updated.
data | BinaryView the Component is contained in |
previousName | Previous name of the component |
component | The component which was modified. |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted after a Component is added to the tree.
data | BinaryView the Component was added to |
component | Component which was added. |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted after a Component is removed from the tree.
data | BinaryView the Component was removed from |
formerParent | Former parent of the Component |
component | The removed and now "dead" Component object. This "dead" Component can no longer be moved to other components or have components added to it. It should not be used after this point for storing any objects, and will be destroyed once no more references are held to it. |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a component is moved from one component to another.
data | BinaryView the Component was removed from |
formerParent | Former parent of the Component |
newParent | New parent which the Component was moved to |
component | The component that was moved. |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a Function is added to a Component.
data | BinaryView containing the Component and Function |
component | Component the Function was added to |
function | The Function which was added |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a Function is removed from a Component.
data | BinaryView containing the Component and Function |
component | Component the Function was removed from |
function | The Function which was removed |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a DataVariable is added to a Component.
data | BinaryView containing the Component and DataVariable |
component | Component the DataVariable was added to |
var | The DataVariable which was added |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a DataVariable is removed from a Component.
data | BinaryView containing the Component and DataVariable |
component | Component the DataVariable was removed from |
var | The DataVariable which was removed |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a Type Archive is attached to a Binary View.
data | BinaryView target |
id | Id of the attached archive |
path | Path on disk of the attached archive |
Reimplemented in NotificationsWorker, and TypeBrowserModel.
|
inlinevirtual |
This notification is posted whenever a Type Archive is detached to a Binary View.
data | BinaryView target |
id | Id of the attached archive |
path | Path on disk of the attached archive |
Reimplemented in NotificationsWorker, and TypeBrowserModel.
|
inlinevirtual |
This notification is posted whenever a previously disconnected Type Archive attached to the Binary View is connected.
data | BinaryView the archive is attached to |
archive | Attached archive |
Reimplemented in NotificationsWorker, and TypeBrowserModel.
|
inlinevirtual |
This notification is posted whenever a previously connected Type Archive attached to the Binary View is disconnected.
data | BinaryView the archive is attached to |
archive | Previously attached archive |
Reimplemented in NotificationsWorker, and TypeBrowserModel.
|
inlinevirtual |
This notification is posted whenever an entry is added to undo history.
data | BinaryView the action was taken on |
entry | UndoEntry |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever an action is undone.
data | BinaryView the action was taken on |
entry | UndoEntry that was undone |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever an action is redone.
data | BinaryView the action was taken on |
entry | UndoEntry that was redone |
Reimplemented in NotificationsWorker.
|
inlinevirtual |
This notification is posted whenever a binary view is rebased.
oldView | BinaryView the old view |
newView | BinaryView the new view |
class BinaryNinja::AnalysisCompletionEvent |
Public Member Functions | |
AnalysisCompletionEvent (BinaryView *view, const std::function< void()> &callback) | |
void | Cancel () |
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNAnalysisCompletionEvent, BNNewAnalysisCompletionEventReference, BNFreeAnalysisCompletionEvent > | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNAnalysisCompletionEvent * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Static Protected Member Functions | |
static void | CompletionCallback (void *ctxt) |
Protected Attributes | |
std::function< void()> | m_callback |
std::recursive_mutex | m_mutex |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNAnalysisCompletionEvent, BNNewAnalysisCompletionEventReference, BNFreeAnalysisCompletionEvent > | |
static BNAnalysisCompletionEvent * | GetObject (CoreRefCountObject *obj) |
static BNAnalysisCompletionEvent * | GetObject (const CoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNAnalysisCompletionEvent, BNNewAnalysisCompletionEventReference, BNFreeAnalysisCompletionEvent > | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNAnalysisCompletionEvent * | m_object |
AnalysisCompletionEvent::AnalysisCompletionEvent | ( | BinaryView * | view, |
const std::function< void()> & | callback | ||
) |
|
staticprotected |
void AnalysisCompletionEvent::Cancel | ( | ) |
|
protected |
|
protected |
struct BinaryNinja::ActiveAnalysisInfo |
Public Member Functions | |
ActiveAnalysisInfo (Ref< Function > f, uint64_t t, size_t uc, size_t sc) | |
Public Attributes | |
Ref< Function > | func |
uint64_t | analysisTime |
size_t | updateCount |
size_t | submitCount |
|
inline |
uint64_t BinaryNinja::ActiveAnalysisInfo::analysisTime |
size_t BinaryNinja::ActiveAnalysisInfo::updateCount |
size_t BinaryNinja::ActiveAnalysisInfo::submitCount |
struct BinaryNinja::AnalysisInfo |
Class Members | ||
---|---|---|
BNAnalysisState | state | |
uint64_t | analysisTime | |
vector< ActiveAnalysisInfo > | activeInfo |
struct BinaryNinja::DataVariable |
Public Member Functions | |
DataVariable () | |
DataVariable (uint64_t a, Type *t, bool d) | |
Public Attributes | |
uint64_t | address |
Confidence< Ref< Type > > | type |
bool | autoDiscovered |
|
inline |
|
inline |
uint64_t BinaryNinja::DataVariable::address |
Confidence<Ref<Type> > BinaryNinja::DataVariable::type |
bool BinaryNinja::DataVariable::autoDiscovered |
struct BinaryNinja::DataVariableAndName |
Public Member Functions | |
DataVariableAndName () | |
DataVariableAndName (uint64_t a, Type *t, bool d, const std::string &n) | |
Public Attributes | |
uint64_t | address |
Confidence< Ref< Type > > | type |
bool | autoDiscovered |
std::string | name |
|
inline |
|
inline |
uint64_t BinaryNinja::DataVariableAndName::address |
Confidence<Ref<Type> > BinaryNinja::DataVariableAndName::type |
bool BinaryNinja::DataVariableAndName::autoDiscovered |
std::string BinaryNinja::DataVariableAndName::name |
class BinaryNinja::TagType |
Public Types | |
typedef BNTagTypeType | Type |
Public Member Functions | |
TagType (BNTagType *tagType) | |
TagType (BinaryView *view) | |
TagType (BinaryView *view, const std::string &name, const std::string &icon, bool visible=true, Type type=UserTagType) | |
BinaryView * | GetView () const |
std::string | GetId () const |
std::string | GetName () const |
void | SetName (const std::string &name) |
Set the name of the TagType. More... | |
std::string | GetIcon () const |
void | SetIcon (const std::string &icon) |
Set the icon to be used for a TagType. More... | |
bool | GetVisible () const |
void | SetVisible (bool visible) |
Set whether the tags of this type are visible. More... | |
Type | GetType () const |
One of: UserTagType, NotificationTagType, BookmarksTagType. More... | |
void | SetType (Type type) |
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNTagType, BNNewTagTypeReference, BNFreeTagType > | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNTagType * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNTagType, BNNewTagTypeReference, BNFreeTagType > | |
static BNTagType * | GetObject (CoreRefCountObject *obj) |
static BNTagType * | GetObject (const CoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNTagType, BNNewTagTypeReference, BNFreeTagType > | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNTagType * | m_object |
TagType::TagType | ( | BNTagType * | tagType | ) |
TagType::TagType | ( | BinaryView * | view | ) |
TagType::TagType | ( | BinaryView * | view, |
const std::string & | name, | ||
const std::string & | icon, | ||
bool | visible = true , |
||
TagType::Type | type = UserTagType |
||
) |
BinaryView * TagType::GetView | ( | ) | const |
std::string TagType::GetId | ( | ) | const |
std::string TagType::GetName | ( | ) | const |
void TagType::SetName | ( | const std::string & | name | ) |
Set the name of the TagType.
name | New name |
std::string TagType::GetIcon | ( | ) | const |
void TagType::SetIcon | ( | const std::string & | icon | ) |
Set the icon to be used for a TagType.
icon | Unicode string containing an emoji to be used as an icon |
bool TagType::GetVisible | ( | ) | const |
void TagType::SetVisible | ( | bool | visible | ) |
Set whether the tags of this type are visible.
visible | Whether the tags of this type are visible |
TagType::Type TagType::GetType | ( | ) | const |
void TagType::SetType | ( | TagType::Type | type | ) |
struct BinaryNinja::TagReference |
Public Types | |
typedef BNTagReferenceType | RefType |
Public Member Functions | |
TagReference () | |
TagReference (const BNTagReference &ref) | |
bool | operator== (const TagReference &other) const |
bool | operator!= (const TagReference &other) const |
operator BNTagReference () const | |
Static Public Member Functions | |
static BNTagReference * | CreateTagReferenceList (const std::vector< TagReference > &tags, size_t *count) |
static std::vector< TagReference > | ConvertTagReferenceList (BNTagReference *tags, size_t count) |
static void | FreeTagReferenceList (BNTagReference *tags, size_t count) |
static std::vector< TagReference > | ConvertAndFreeTagReferenceList (BNTagReference *tags, size_t count) |
Public Attributes | |
RefType | refType |
bool | autoDefined |
Ref< Tag > | tag |
Ref< Architecture > | arch |
Ref< Function > | func |
uint64_t | addr |
TagReference::TagReference | ( | ) |
TagReference::TagReference | ( | const BNTagReference & | ref | ) |
bool TagReference::operator== | ( | const TagReference & | other | ) | const |
bool TagReference::operator!= | ( | const TagReference & | other | ) | const |
TagReference::operator BNTagReference | ( | ) | const |
|
static |
|
static |
|
static |
|
static |
RefType BinaryNinja::TagReference::refType |
bool BinaryNinja::TagReference::autoDefined |
Ref<Architecture> BinaryNinja::TagReference::arch |
uint64_t BinaryNinja::TagReference::addr |
class BinaryNinja::Segment |
The Segment object is returned during BinaryView creation and should not be directly instantiated.
Public Member Functions | |
Segment (BNSegment *seg) | |
uint64_t | GetStart () const |
uint64_t | GetLength () const |
uint64_t | GetEnd () const |
uint64_t | GetDataEnd () const |
uint64_t | GetDataOffset () const |
uint64_t | GetDataLength () const |
uint32_t | GetFlags () const |
bool | IsAutoDefined () const |
std::vector< std::pair< uint64_t, uint64_t > > | GetRelocationRanges () const |
std::vector< std::pair< uint64_t, uint64_t > > | GetRelocationRangesAtAddress (uint64_t addr) const |
std::vector< Ref< Relocation > > | GetRelocationsInRange (uint64_t addr, uint64_t size) const |
uint64_t | GetRelocationsCount () const |
void | SetLength (uint64_t length) |
void | SetDataOffset (uint64_t dataOffset) |
void | SetDataLength (uint64_t dataLength) |
void | SetFlags (uint32_t flags) |
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNSegment, BNNewSegmentReference, BNFreeSegment > | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNSegment * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNSegment, BNNewSegmentReference, BNFreeSegment > | |
static BNSegment * | GetObject (CoreRefCountObject *obj) |
static BNSegment * | GetObject (const CoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNSegment, BNNewSegmentReference, BNFreeSegment > | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNSegment * | m_object |
Segment::Segment | ( | BNSegment * | seg | ) |
uint64_t Segment::GetStart | ( | ) | const |
uint64_t Segment::GetLength | ( | ) | const |
uint64_t Segment::GetEnd | ( | ) | const |
uint64_t Segment::GetDataEnd | ( | ) | const |
uint64_t Segment::GetDataOffset | ( | ) | const |
uint64_t Segment::GetDataLength | ( | ) | const |
uint32_t Segment::GetFlags | ( | ) | const |
bool Segment::IsAutoDefined | ( | ) | const |
vector< pair< uint64_t, uint64_t > > Segment::GetRelocationRanges | ( | ) | const |
vector< pair< uint64_t, uint64_t > > Segment::GetRelocationRangesAtAddress | ( | uint64_t | addr | ) | const |
std::vector< Ref< Relocation > > BinaryNinja::Segment::GetRelocationsInRange | ( | uint64_t | addr, |
uint64_t | size | ||
) | const |
uint64_t Segment::GetRelocationsCount | ( | ) | const |
void Segment::SetLength | ( | uint64_t | length | ) |
void Segment::SetDataOffset | ( | uint64_t | dataOffset | ) |
void Segment::SetDataLength | ( | uint64_t | dataLength | ) |
void Segment::SetFlags | ( | uint32_t | flags | ) |
class BinaryNinja::Section |
The Section object is returned during BinaryView creation and should not be directly instantiated.
Public Member Functions | |
Section (BNSection *sec) | |
Section (const std::string &name, uint64_t start, uint64_t length, BNSectionSemantics semantics, const std::string &type, uint64_t align, uint64_t entrySize, const std::string &linkedSection, const std::string &infoSection, uint64_t infoData, bool autoDefined) | |
std::string | GetName () const |
std::string | GetType () const |
uint64_t | GetStart () const |
uint64_t | GetLength () const |
uint64_t | GetEnd () const |
uint64_t | GetInfoData () const |
uint64_t | GetAlignment () const |
uint64_t | GetEntrySize () const |
std::string | GetLinkedSection () const |
std::string | GetInfoSection () const |
BNSectionSemantics | GetSemantics () const |
bool | AutoDefined () const |
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNSection, BNNewSectionReference, BNFreeSection > | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNSection * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Additional Inherited Members | |
Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNSection, BNNewSectionReference, BNFreeSection > | |
static BNSection * | GetObject (CoreRefCountObject *obj) |
static BNSection * | GetObject (const CoreRefCountObject *obj) |
Public Attributes inherited from BinaryNinja::CoreRefCountObject< BNSection, BNNewSectionReference, BNFreeSection > | |
std::atomic< int > | m_refs |
bool | m_registeredRef |
BNSection * | m_object |
Section::Section | ( | BNSection * | sec | ) |
BinaryNinja::Section::Section | ( | const std::string & | name, |
uint64_t | start, | ||
uint64_t | length, | ||
BNSectionSemantics | semantics, | ||
const std::string & | type, | ||
uint64_t | align, | ||
uint64_t | entrySize, | ||
const std::string & | linkedSection, | ||
const std::string & | infoSection, | ||
uint64_t | infoData, | ||
bool | autoDefined | ||
) |
std::string Section::GetName | ( | ) | const |
std::string Section::GetType | ( | ) | const |
uint64_t Section::GetStart | ( | ) | const |
uint64_t Section::GetLength | ( | ) | const |
uint64_t Section::GetEnd | ( | ) | const |
uint64_t Section::GetInfoData | ( | ) | const |
uint64_t Section::GetAlignment | ( | ) | const |
uint64_t Section::GetEntrySize | ( | ) | const |
std::string Section::GetLinkedSection | ( | ) | const |
std::string Section::GetInfoSection | ( | ) | const |
BNSectionSemantics Section::GetSemantics | ( | ) | const |
bool Section::AutoDefined | ( | ) | const |
class BinaryNinja::BinaryView |
BinaryView
implements a view on binary data, and presents a queryable interface of a binary file.
One key job of BinaryView is file format parsing which allows Binary Ninja to read, write, insert, remove portions of the file given a virtual address. For the purposes of this documentation we define a virtual address as the memory address that the various pieces of the physical file will be loaded at.
A binary file does not have to have just one BinaryView, thus much of the interface to manipulate disassembly exists within or is accessed through a BinaryView. All files are guaranteed to have at least the Raw
BinaryView. The Raw
BinaryView is simply a hex editor, but is helpful for manipulating binary files via their absolute addresses.
BinaryViews are plugins and thus registered with Binary Ninja at startup, and thus should **never** be instantiated directly as this is already done. The list of available BinaryViews can be seen in the BinaryViewType class which provides an iterator and map of the various installed BinaryViews:
In the python console:
To open a file with a given BinaryView the following code is recommended:
When a BinaryView is open on an executable view analysis is automatically run unless specific named parameters are used to disable updates. If such a parameter is used, updates can be triggered using the UpdateAnalysisAndWait()
method which disassembles the executable and returns when all disassembly and analysis is complete:
Since BinaryNinja's analysis is multi-threaded this can also be done in the background by using the UpdateAnalysis
method instead.
\*User\*
() methods. Binary Ninja makes a distinction between edits performed by the user and actions performed by auto analysis. Auto analysis actions that can quickly be recalculated are not saved to the database. Auto analysis actions that take a long time and all user edits are stored in the database (e.g. RemoveUserFunction
rather than RemoveFunction
). Thus use \*User\*
() methods if saving to the database is desired. Public Member Functions | |
void | NotifyDataWritten (uint64_t offset, size_t len) |
void | NotifyDataInserted (uint64_t offset, size_t len) |
void | NotifyDataRemoved (uint64_t offset, uint64_t len) |
BinaryView (BNBinaryView *view) | |
virtual bool | Init () |
FileMetadata * | GetFile () const |
Ref< BinaryView > | GetParentView () const |
std::string | GetTypeName () const |
bool | IsModified () const |
bool | IsAnalysisChanged () const |
bool | CreateDatabase (const std::string &path, Ref< SaveSettings > settings=new SaveSettings()) |
Writes the current database (.bndb) out to the specified file. More... | |
bool | CreateDatabase (const std::string &path, const std::function< bool(size_t progress, size_t total)> &progressCallback, Ref< SaveSettings > settings=new SaveSettings()) |
Writes the current database (.bndb) out to the specified file. More... | |
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()) |
bool | RunUndoableTransaction (std::function< bool()> func) |
Run a function in a context in which any changes made to analysis will be added to an undo state. More... | |
std::string | BeginUndoActions (bool anonymousAllowed=true) |
Start recording actions taken so they can be undone at some point. More... | |
void | CommitUndoActions (const std::string &id) |
Commit the actions taken since a call to BeginUndoActions. More... | |
void | RevertUndoActions (const std::string &id) |
Revert the actions taken since a call to BeginUndoActions. More... | |
void | ForgetUndoActions (const std::string &id) |
Forget the actions taken since a call to BeginUndoActions. More... | |
bool | CanUndo () |
bool | Undo () |
Undo the last committed action in the undo database. More... | |
bool | CanRedo () |
bool | Redo () |
Redo the last committed action in the undo database. More... | |
std::string | GetCurrentView () |
Get the current View name, e.g. More... | |
uint64_t | GetCurrentOffset () |
Get the current offset in the current view. More... | |
bool | Navigate (const std::string &view, uint64_t offset) |
Navigate to the specified virtual address in the specified view. More... | |
size_t | Read (void *dest, uint64_t offset, size_t len) |
Read writes `len` bytes at virtual address `offset` to address `dest`. More... | |
DataBuffer | ReadBuffer (uint64_t offset, size_t len) |
ReadBuffer reads len bytes from a virtual address into a DataBuffer. More... | |
size_t | Write (uint64_t offset, const void *data, size_t len) |
Write writes `len` bytes data at address `dest` to virtual address `offset`. More... | |
size_t | WriteBuffer (uint64_t offset, const DataBuffer &data) |
WriteBuffer writes the contents of a DataBuffer into a virtual address. More... | |
size_t | Insert (uint64_t offset, const void *data, size_t len) |
Insert inserts `len` bytes data at address `dest` starting from virtual address `offset`. More... | |
size_t | InsertBuffer (uint64_t offset, const DataBuffer &data) |
InsertBuffer inserts the contents of a DataBuffer starting from a virtual address. More... | |
size_t | Remove (uint64_t offset, uint64_t len) |
PerformRemove removes `len` bytes from virtual address `offset`. More... | |
std::vector< float > | GetEntropy (uint64_t offset, size_t len, size_t blockSize) |
BNModificationStatus | GetModification (uint64_t offset) |
GetModification checks whether the virtual address `offset` is modified. More... | |
std::vector< BNModificationStatus > | GetModification (uint64_t offset, size_t len) |
bool | IsValidOffset (uint64_t offset) const |
IsValidOffset checks whether a virtual address `offset` is valid. More... | |
bool | IsOffsetReadable (uint64_t offset) const |
IsOffsetReadable checks whether a virtual address is readable. More... | |
bool | IsOffsetWritable (uint64_t offset) const |
IsOffsetWritable checks whether a virtual address is writable. More... | |
bool | IsOffsetExecutable (uint64_t offset) const |
IsOffsetExecutable checks whether a virtual address is executable. More... | |
bool | IsOffsetBackedByFile (uint64_t offset) const |
IsOffsetBackedByFile checks whether a virtual address is backed by a file. More... | |
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 |
GetNextValidOffset implements a query for the next valid readable, writable, or executable virtual memory address after `offset`. More... | |
uint64_t | GetOriginalBase () const |
GetOriginalBase queries for the original image base in the BinaryView, unaffected by any rebasing operations. More... | |
void | SetOriginalBase (uint64_t base) |
SetOriginalBase sets the original image base in the BinaryView, unaffected by any rebasing operations. More... | |
uint64_t | GetStart () const |
GetStart queries for the first valid virtual address in the BinaryView. More... | |
uint64_t | GetEnd () const |
GetEnd queries for the end virtual address of the BinaryView. More... | |
uint64_t | GetLength () const |
GetLength queries for the total length of the BinaryView from start to end. More... | |
uint64_t | GetEntryPoint () const |
GetEntryPoint returns the entry point of the executable in the BinaryView. More... | |
Ref< Architecture > | GetDefaultArchitecture () const |
GetDefaultArchitecture returns the current "default architecture" for the BinaryView. More... | |
void | SetDefaultArchitecture (Architecture *arch) |
SetDefaultArchitecture allows setting the default architecture for the BinaryView. More... | |
Ref< Platform > | GetDefaultPlatform () const |
GetDefaultPlatform returns the current default platform for the BinaryView. More... | |
void | SetDefaultPlatform (Platform *platform) |
SetDefaultPlatform allows setting the default platform for the BinaryView. More... | |
BNEndianness | GetDefaultEndianness () const |
GetDefaultEndianness returns the default endianness for the BinaryView. More... | |
bool | IsRelocatable () const |
Whether the binary is relocatable. More... | |
size_t | GetAddressSize () const |
Address size of the binary. More... | |
bool | IsExecutable () const |
Whether the binary is an executable. More... | |
bool | Save (FileAccessor *file) |
Save the original binary file to a FileAccessor. More... | |
bool | Save (const std::string &path) |
Save the original binary file to the provided destination. More... | |
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 |
std::vector< Ref< Relocation > > | GetRelocationsAt (uint64_t addr) const |
void | RegisterNotification (BinaryDataNotification *notify) |
Provides a mechanism for receiving callbacks for various analysis events. More... | |
void | UnregisterNotification (BinaryDataNotification *notify) |
Unregister a notification passed to RegisterNotification. More... | |
void | AddAnalysisOption (const std::string &name) |
Adds an analysis option. More... | |
Ref< Function > | AddFunctionForAnalysis (Platform *platform, uint64_t addr, bool autoDiscovered=false, Type *type=nullptr) |
Add a new function of the given platform at the virtual address. More... | |
void | AddEntryPointForAnalysis (Platform *platform, uint64_t start) |
adds an virtual address to start analysis from for a given platform More... | |
void | AddToEntryFunctions (Function *func) |
adds an function to all entry function list More... | |
void | RemoveAnalysisFunction (Function *func, bool updateRefs=false) |
removes a function from the list of functions More... | |
Ref< Function > | CreateUserFunction (Platform *platform, uint64_t start) |
Add a new user function of the given platform at the virtual address. More... | |
void | RemoveUserFunction (Function *func) |
removes a user function from the list of functions More... | |
bool | HasInitialAnalysis () |
check for the presence of an initial analysis in this BinaryView. More... | |
void | SetAnalysisHold (bool enable) |
Controls the analysis hold for this BinaryView. More... | |
void | UpdateAnalysisAndWait () |
start the analysis running and dont return till it is complete More... | |
void | UpdateAnalysis () |
asynchronously starts the analysis running and returns immediately. More... | |
void | AbortAnalysis () |
Abort the currently running analysis. More... | |
void | DefineDataVariable (uint64_t addr, const Confidence< Ref< Type > > &type) |
Define a DataVariable at a given address with a set type. More... | |
void | DefineUserDataVariable (uint64_t addr, const Confidence< Ref< Type > > &type) |
Define a user DataVariable at a given address with a set type. More... | |
void | UndefineDataVariable (uint64_t addr) |
Undefine a DataVariable at a given address. More... | |
void | UndefineUserDataVariable (uint64_t addr) |
Undefine a user DataVariable at a given address. More... | |
std::map< uint64_t, DataVariable > | GetDataVariables () |
Get a map of DataVariables defined in the current BinaryView. More... | |
bool | GetDataVariableAtAddress (uint64_t addr, DataVariable &var) |
Get a DataVariable at a given address. More... | |
std::vector< Ref< Function > > | GetAnalysisFunctionList () |
Get a list of functions within this BinaryView. More... | |
bool | HasFunctions () const |
Check whether the BinaryView has any functions defined. More... | |
Ref< Function > | GetAnalysisFunction (Platform *platform, uint64_t addr) |
Gets a function object for the function starting at a virtual address. More... | |
Ref< Function > | GetRecentAnalysisFunctionForAddress (uint64_t addr) |
Get the most recently used Function starting at a virtual address. More... | |
std::vector< Ref< Function > > | GetAnalysisFunctionsForAddress (uint64_t addr) |
Get a list of functions defined at an address. More... | |
std::vector< Ref< Function > > | GetAnalysisFunctionsContainingAddress (uint64_t addr) |
Get a list of functions containing an address. More... | |
Ref< Function > | GetAnalysisEntryPoint () |
Get the function defined as the Analysis entry point for the view. More... | |
std::vector< Ref< Function > > | GetAllEntryFunctions () |
Get all entry functions (including user-defined ones) More... | |
Ref< BasicBlock > | GetRecentBasicBlockForAddress (uint64_t addr) |
Get most recently used Basic Block containing a virtual address. More... | |
std::vector< Ref< BasicBlock > > | GetBasicBlocksForAddress (uint64_t addr) |
Get a list of Basic Blocks containing a virtual address. More... | |
std::vector< Ref< BasicBlock > > | GetBasicBlocksStartingAtAddress (uint64_t addr) |
Get a list of basic blocks starting at a virtual address. More... | |
std::vector< ReferenceSource > | GetCodeReferences (uint64_t addr) |
Get a list of references made from code (instructions) to a virtual address. More... | |
std::vector< ReferenceSource > | GetCodeReferences (uint64_t addr, uint64_t len) |
Get a list of references from code (instructions) to a range of addresses. More... | |
std::vector< uint64_t > | GetCodeReferencesFrom (ReferenceSource src) |
Get code references made by a particular "ReferenceSource". More... | |
std::vector< uint64_t > | GetCodeReferencesFrom (ReferenceSource src, uint64_t len) |
Get code references from a range of addresses. More... | |
std::vector< uint64_t > | GetDataReferences (uint64_t addr) |
Get references made by data ('DataVariables') to a virtual address. More... | |
std::vector< uint64_t > | GetDataReferences (uint64_t addr, uint64_t len) |
Get references made by data ('DataVariables') in a given range, to a virtual address. More... | |
std::vector< uint64_t > | GetDataReferencesFrom (uint64_t addr) |
Get references made by data ('DataVariables') located at a virtual address. More... | |
std::vector< uint64_t > | GetDataReferencesFrom (uint64_t addr, uint64_t len) |
Get references made by data ('DataVariables') located in a range of virtual addresses. More... | |
void | AddUserDataReference (uint64_t fromAddr, uint64_t toAddr) |
Add a user Data Reference from a virtual address to another virtual address. More... | |
void | RemoveUserDataReference (uint64_t fromAddr, uint64_t toAddr) |
Remove a user Data Reference from a virtual address to another virtual address. More... | |
std::vector< ReferenceSource > | GetCodeReferencesForType (const QualifiedName &type) |
Get code references to a Type. More... | |
std::vector< uint64_t > | GetDataReferencesForType (const QualifiedName &type) |
Get data references to a Type. More... | |
std::vector< TypeReferenceSource > | GetTypeReferencesForType (const QualifiedName &type) |
Get Type references to a Type. More... | |
std::vector< TypeFieldReference > | GetCodeReferencesForTypeField (const QualifiedName &type, uint64_t offset) |
Returns a list of references to a specific type field. More... | |
std::vector< uint64_t > | GetDataReferencesForTypeField (const QualifiedName &type, uint64_t offset) |
Returns a list of virtual addresses of data which references the type type . More... | |
std::vector< uint64_t > | GetDataReferencesFromForTypeField (const QualifiedName &type, uint64_t offset) |
Returns a list of virtual addresses of data which are referenced from the type type . More... | |
std::vector< TypeReferenceSource > | GetTypeReferencesForTypeField (const QualifiedName &type, uint64_t offset) |
Returns a list of type references to a specific type field. More... | |
std::vector< TypeReferenceSource > | GetCodeReferencesForTypeFrom (ReferenceSource src) |
Returns a list of types referenced by code at ReferenceSource src . More... | |
std::vector< TypeReferenceSource > | GetCodeReferencesForTypeFrom (ReferenceSource src, uint64_t len) |
Returns a list of types referenced by code at ReferenceSource src . More... | |
std::vector< TypeReferenceSource > | GetCodeReferencesForTypeFieldFrom (ReferenceSource src) |
Returns a list of type fields referenced by code at ReferenceSource src . More... | |
std::vector< TypeReferenceSource > | GetCodeReferencesForTypeFieldFrom (ReferenceSource src, uint64_t len) |
Returns a list of type fields referenced by code at ReferenceSource src . More... | |
std::vector< uint64_t > | GetAllFieldsReferenced (const QualifiedName &type) |
Returns a list of offsets in the QualifiedName specified by name, which are referenced by code. More... | |
std::map< uint64_t, std::vector< size_t > > | GetAllSizesReferenced (const QualifiedName &type) |
Returns a map from field offset to a list of sizes of the accesses to the specified type. More... | |
std::map< uint64_t, std::vector< Confidence< Ref< Type > > > > | GetAllTypesReferenced (const QualifiedName &type) |
Returns a map from field offset to a list of incoming types written to the specified type. More... | |
std::vector< size_t > | GetSizesReferenced (const QualifiedName &type, uint64_t offset) |
Returns a list of types related to the type field access. More... | |
std::vector< Confidence< Ref< Type > > > | GetTypesReferenced (const QualifiedName &type, uint64_t offset) |
Returns a list of types referenced by a particular type field. More... | |
std::unordered_set< QualifiedName > | GetOutgoingDirectTypeReferences (const QualifiedName &type) |
std::unordered_set< QualifiedName > | GetOutgoingRecursiveTypeReferences (const QualifiedName &type) |
std::unordered_set< QualifiedName > | GetOutgoingRecursiveTypeReferences (const std::unordered_set< QualifiedName > &types) |
std::unordered_set< QualifiedName > | GetIncomingDirectTypeReferences (const QualifiedName &type) |
std::unordered_set< QualifiedName > | GetIncomingRecursiveTypeReferences (const QualifiedName &type) |
std::unordered_set< QualifiedName > | GetIncomingRecursiveTypeReferences (const std::unordered_set< QualifiedName > &types) |
Ref< Structure > | CreateStructureBasedOnFieldAccesses (const QualifiedName &type) |
std::vector< uint64_t > | GetCallees (ReferenceSource addr) |
Returns a list of virtual addresses called by the call site in the ReferenceSource. More... | |
std::vector< ReferenceSource > | GetCallers (uint64_t addr) |
Returns a list of ReferenceSource objects (xrefs or cross-references) that call the provided virtual address. More... | |
Ref< Symbol > | GetSymbolByAddress (uint64_t addr, const NameSpace &nameSpace=NameSpace()) |
Returns the Symbol at the provided virtual address. More... | |
Ref< Symbol > | GetSymbolByRawName (const std::string &name, const NameSpace &nameSpace=NameSpace()) |
Retrieves a Symbol object for the given a raw (mangled) name. More... | |
std::vector< Ref< Symbol > > | GetSymbolsByName (const std::string &name, const NameSpace &nameSpace=NameSpace()) |
Retrieves a list of symbols with a given name. More... | |
std::vector< Ref< Symbol > > | GetSymbolsByRawName (const std::string &name, const NameSpace &nameSpace=NameSpace()) |
Retrieves the list of all Symbol objects with a given raw name. More... | |
std::vector< Ref< Symbol > > | GetSymbols (const NameSpace &nameSpace=NameSpace()) |
Retrieves the list of all Symbol objects. More... | |
std::vector< Ref< Symbol > > | GetSymbols (uint64_t start, uint64_t len, const NameSpace &nameSpace=NameSpace()) |
Retrieves a list of symbols in a given range. More... | |
std::vector< Ref< Symbol > > | GetSymbolsOfType (BNSymbolType type, const NameSpace &nameSpace=NameSpace()) |
Retrieves a list of all Symbol objects of the provided symbol type. More... | |
std::vector< Ref< Symbol > > | GetSymbolsOfType (BNSymbolType type, uint64_t start, uint64_t len, const NameSpace &nameSpace=NameSpace()) |
Retrieves a list of all Symbol objects of the provided symbol type in the given range. More... | |
std::vector< Ref< Symbol > > | GetVisibleSymbols (const NameSpace &nameSpace=NameSpace()) |
Get the list of visible symbols. More... | |
void | DefineAutoSymbol (Ref< Symbol > sym) |
Adds a symbol to the internal list of automatically discovered Symbol objects in a given namespace. More... | |
Ref< Symbol > | DefineAutoSymbolAndVariableOrFunction (Ref< Platform > platform, Ref< Symbol > sym, Ref< Type > type) |
Defines an "Auto" symbol, and a Variable/Function alongside it. More... | |
void | UndefineAutoSymbol (Ref< Symbol > sym) |
Undefine an automatically defined symbol. More... | |
void | DefineUserSymbol (Ref< Symbol > sym) |
Define a user symbol. More... | |
void | UndefineUserSymbol (Ref< Symbol > sym) |
Undefine a user symbol. More... | |
void | DefineImportedFunction (Ref< Symbol > importAddressSym, Ref< Function > func, Ref< Type > type=nullptr) |
Defines an imported Function func with a ImportedFunctionSymbol type. More... | |
Ref< DebugInfo > | GetDebugInfo () |
The current debug info object for this binary view. More... | |
void | ApplyDebugInfo (Ref< DebugInfo > newDebugInfo) |
Sets the debug info and applies its contents to the current BinaryView. More... | |
void | SetDebugInfo (Ref< DebugInfo > newDebugInfo) |
Sets the debug info for the current binary view. More... | |
bool | IsApplyingDebugInfo () const |
Determine is a debug info object is currently being applied. More... | |
void | BeginBulkModifySymbols () |
void | EndBulkModifySymbols () |
void | AddTagType (Ref< TagType > tagType) |
Add a new TagType to this binaryview. More... | |
void | RemoveTagType (Ref< TagType > tagType) |
Remove a TagType from this binaryview. More... | |
Ref< TagType > | GetTagType (const std::string &name) |
Get a TagType by name. More... | |
Ref< TagType > | GetTagType (const std::string &name, TagType::Type type) |
Get a TagType by name and TagType::Type. More... | |
Ref< TagType > | GetTagTypeByName (const std::string &name) |
Get a TagType by name. More... | |
Ref< TagType > | GetTagTypeByName (const std::string &name, TagType::Type type) |
Get a TagType by name and TagType::Type. More... | |
Ref< TagType > | GetTagTypeById (const std::string &id) |
Get a TagType by its ID. More... | |
Ref< TagType > | GetTagTypeById (const std::string &id, TagType::Type type) |
Get a TagType by its ID and TagType::Type. More... | |
std::vector< Ref< TagType > > | GetTagTypes () |
Get the list of all defined TagTypes. More... | |
void | AddTag (Ref< Tag > tag, bool user=false) |
Add a Tag. More... | |
void | RemoveTag (Ref< Tag > tag, bool user=false) |
Remove a tag. More... | |
Ref< Tag > | GetTag (const std::string &tagId) |
Get a tag by its ID. More... | |
std::vector< TagReference > | GetAllTagReferences () |
std::vector< TagReference > | GetAllAddressTagReferences () |
std::vector< TagReference > | GetAllFunctionTagReferences () |
std::vector< TagReference > | GetAllTagReferencesOfType (Ref< TagType > tagType) |
std::vector< TagReference > | GetTagReferencesOfType (Ref< TagType > tagType) |
size_t | GetTagReferencesOfTypeCount (Ref< TagType > tagType) |
size_t | GetAllTagReferencesOfTypeCount (Ref< TagType > tagType) |
std::map< Ref< TagType >, size_t > | GetAllTagReferenceTypeCounts () |
std::vector< TagReference > | GetDataTagReferences () |
std::vector< TagReference > | GetAutoDataTagReferences () |
std::vector< TagReference > | GetUserDataTagReferences () |
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< TagReference > | GetDataTagsInRange (uint64_t start, uint64_t end) |
std::vector< TagReference > | GetAutoDataTagsInRange (uint64_t start, uint64_t end) |
std::vector< TagReference > | GetUserDataTagsInRange (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< Tag > | CreateAutoDataTag (uint64_t addr, const std::string &tagTypeName, const std::string &data, bool unique=false) |
Ref< Tag > | CreateUserDataTag (uint64_t addr, const std::string &tagTypeName, const std::string &data, bool unique=false) |
Ref< Tag > | CreateAutoDataTag (uint64_t addr, Ref< TagType > tagType, const std::string &data, bool unique=false) |
Ref< Tag > | CreateUserDataTag (uint64_t addr, Ref< TagType > tagType, const std::string &data, bool unique=false) |
std::optional< Ref< Component > > | GetComponentByGuid (std::string guid) |
Lookup a component by its GUID. More... | |
std::optional< Ref< Component > > | GetComponentByPath (std::string path) |
Lookup a component by its pathname. More... | |
Ref< Component > | GetRootComponent () |
Get the root component for the BinaryView (read-only) More... | |
Ref< Component > | CreateComponent () |
Create a component. More... | |
Ref< Component > | CreateComponent (std::string parentGUID) |
Create a component as a subcomponent of the component with a given Guid. More... | |
Ref< Component > | CreateComponent (Ref< Component > parent) |
Create a component as a subcomponent of a given Component. More... | |
Ref< Component > | CreateComponentWithName (std::string name, std::string parentGUID={}) |
Create a component with a given name and optional parent. More... | |
Ref< Component > | CreateComponentWithName (std::string name, Ref< Component > parent) |
Create a component with a given name and parent. More... | |
bool | RemoveComponent (Ref< Component > component) |
Remove a component from the tree entirely. More... | |
bool | RemoveComponent (std::string guid) |
Remove a component from the tree entirely. More... | |
std::vector< Ref< Component > > | GetFunctionParentComponents (Ref< Function > function) const |
std::vector< Ref< Component > > | GetDataVariableParentComponents (DataVariable var) const |
std::optional< BNStringType > | CheckForStringAnnotationType (uint64_t addr, std::string &value, bool allowShortStrings, bool allowLargeStrings, size_t childWidth) |
Heuristically determine if a string exists at the given address. More... | |
bool | CanAssemble (Architecture *arch) |
Check whether the given architecture supports assembling instructions. More... | |
bool | IsNeverBranchPatchAvailable (Architecture *arch, uint64_t addr) |
Check whether the "Never Branch" patch is available for a given architecture at a given address. More... | |
bool | IsAlwaysBranchPatchAvailable (Architecture *arch, uint64_t addr) |
Check whether the "Always Branch" patch is available for a given architecture at a given address. More... | |
bool | IsInvertBranchPatchAvailable (Architecture *arch, uint64_t addr) |
Check whether the "Invert Branch" patch is available for a given architecture at a given address. More... | |
bool | IsSkipAndReturnZeroPatchAvailable (Architecture *arch, uint64_t addr) |
Check whether the "Skip and Return Zero" patch is available for a given architecture at a given address. More... | |
bool | IsSkipAndReturnValuePatchAvailable (Architecture *arch, uint64_t addr) |
Check whether the "Skip and Return Value" patch is available for a given architecture at a given address. More... | |
bool | ConvertToNop (Architecture *arch, uint64_t addr) |
Convert the instruction at the given address to a nop. More... | |
bool | AlwaysBranch (Architecture *arch, uint64_t addr) |
Convert the conditional branch at the given address to always branch. More... | |
bool | InvertBranch (Architecture *arch, uint64_t addr) |
Convert the conditional branch at the given address to branch under inverted conditions. More... | |
bool | SkipAndReturnValue (Architecture *arch, uint64_t addr, uint64_t value) |
Convert the given instruction to skip the rest of the function and return 0. More... | |
size_t | GetInstructionLength (Architecture *arch, uint64_t addr) |
Get the length of the instruction at a given address. More... | |
bool | GetStringAtAddress (uint64_t addr, BNStringReference &strRef) |
Get the string at an address. More... | |
std::vector< BNStringReference > | GetStrings () |
Get the list of strings located within the view. More... | |
std::vector< BNStringReference > | GetStrings (uint64_t start, uint64_t len) |
Get the list of strings located within a range. More... | |
Ref< AnalysisCompletionEvent > | AddAnalysisCompletionEvent (const std::function< void()> &callback) |
Sets up a call back function to be called when analysis has been completed. More... | |
AnalysisInfo | GetAnalysisInfo () |
BNAnalysisProgress | GetAnalysisProgress () |
Ref< BackgroundTask > | GetBackgroundAnalysisTask () |
uint64_t | GetNextFunctionStartAfterAddress (uint64_t addr) |
Returns the virtual address of the Function that occurs after the virtual address `addr`. More... | |
uint64_t | GetNextBasicBlockStartAfterAddress (uint64_t addr) |
Returns the virtual address of the BasicBlock that occurs after the virtual address `addr`. More... | |
uint64_t | GetNextDataAfterAddress (uint64_t addr) |
Retrieves the virtual address of the next non-code byte. More... | |
uint64_t | GetNextDataVariableStartAfterAddress (uint64_t addr) |
Retrieves the address of the next DataVariable. More... | |
uint64_t | GetPreviousFunctionStartBeforeAddress (uint64_t addr) |
Returns the virtual address of the Function that occurs prior to the virtual address provided. More... | |
uint64_t | GetPreviousBasicBlockStartBeforeAddress (uint64_t addr) |
Returns the virtual address of the Basic Block that occurs prior to the virtual address provided. More... | |
uint64_t | GetPreviousBasicBlockEndBeforeAddress (uint64_t addr) |
Returns the ending virtual address of the Basic Block that occurs prior to the virtual address provided. More... | |
uint64_t | GetPreviousDataBeforeAddress (uint64_t addr) |
Returns the virtual address of the previous data (non-code) byte. More... | |
uint64_t | GetPreviousDataVariableStartBeforeAddress (uint64_t addr) |
Returns the virtual address of the previous DataVariable. More... | |
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 importDependencies=true) |
Parse a single type and name from a string containing their definition. More... | |
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 importDependencies=true) |
Parse an entire block of source into types, variables, and functions. More... | |
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={}, bool importDependencies=true) |
Parse an entire block of source into a structure containing types, variables, and functions. More... | |
class TypeContainer | GetTypeContainer () |
Type Container for all types (user and auto) in the BinaryView. More... | |
class TypeContainer | GetAutoTypeContainer () |
Type Container for ONLY auto types in the BinaryView. More... | |
class TypeContainer | GetUserTypeContainer () |
Type Container for ONLY user types in the BinaryView. More... | |
std::map< QualifiedName, Ref< Type > > | GetTypes () |
std::vector< std::pair< QualifiedName, Ref< Type > > > | GetDependencySortedTypes () |
List of all types, sorted such that types are after all types on which they depend. More... | |
std::vector< QualifiedName > | GetTypeNames (const std::string &matching="") |
Ref< Type > | GetTypeByName (const QualifiedName &name) |
Ref< Type > | GetTypeByRef (Ref< NamedTypeReference > name) |
Ref< Type > | GetTypeById (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) |
std::unordered_map< std::string, QualifiedName > | 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 | DefineUserTypes (const std::vector< ParsedType > &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) |
std::optional< std::pair< Ref< Platform >, QualifiedName > > | LookupImportedTypePlatform (const QualifiedName &name) |
Gives you details of which platform and name was imported to result in the given type name. More... | |
void | AddTypeLibrary (TypeLibrary *lib) |
Make the contents of a type library available for type/import resolution. More... | |
Ref< TypeLibrary > | GetTypeLibrary (const std::string &name) |
Get the type library with the given name. More... | |
std::vector< Ref< TypeLibrary > > | GetTypeLibraries () |
Get the list of imported type libraries. More... | |
Ref< Type > | ImportTypeLibraryType (Ref< TypeLibrary > &lib, const QualifiedName &name) |
Recursively imports a type from the specified type library, or, if no library was explicitly provided, the first type library associated with the current `BinaryView` that provides the name requested. More... | |
Ref< Type > | ImportTypeLibraryObject (Ref< TypeLibrary > &lib, const QualifiedName &name) |
Recursively imports an object from the specified type library, or, if no library was explicitly provided, the first type library associated with the current `BinaryView` that provides the name requested. More... | |
Ref< Type > | ImportTypeLibraryTypeByGuid (const std::string &guid) |
Recursively imports a type by guid from the current BinaryView's set of type libraries. More... | |
std::optional< QualifiedName > | GetTypeNameByGuid (const std::string &guid) |
void | ExportTypeToTypeLibrary (TypeLibrary *lib, const QualifiedName &name, Type *type) |
Recursively exports ``type`` into ``lib`` as a type with name ``name``. More... | |
void | ExportObjectToTypeLibrary (TypeLibrary *lib, const QualifiedName &name, Type *type) |
Recursively exports ``type`` into ``lib`` as an object with name ``name``. More... | |
void | RecordImportedObjectLibrary (Platform *tgtPlatform, uint64_t tgtAddr, TypeLibrary *lib, const QualifiedName &name) |
Should be called by custom `BinaryView` implementations when they have successfully imported an object from a type library (eg a symbol's type). More... | |
std::optional< std::pair< Ref< TypeLibrary >, QualifiedName > > | LookupImportedObjectLibrary (Platform *tgtPlatform, uint64_t tgtAddr) |
Gives you details of which type library and name was used to determine the type of a symbol at a given address. More... | |
std::optional< std::pair< Ref< TypeLibrary >, QualifiedName > > | LookupImportedTypeLibrary (const QualifiedName &name) |
Gives you details of which type library and name was imported to result in the given type name. More... | |
Ref< TypeArchive > | AttachTypeArchive (const std::string &id, const std::string &path) |
Attach a given type archive to the binary view. More... | |
void | DetachTypeArchive (const std::string &id) |
Detach from a type archive, breaking all associations to types with the archive. More... | |
Ref< TypeArchive > | GetTypeArchive (const std::string &id) const |
Look up a connected archive by its id. More... | |
std::unordered_map< std::string, std::string > | GetTypeArchives () const |
Get all attached type archives. More... | |
std::optional< std::string > | GetTypeArchivePath (const std::string &id) const |
Look up the path for an attached (but not necessarily connected) type archive by its id. More... | |
std::unordered_map< QualifiedName, std::map< std::string, std::string > > | GetTypeArchiveTypeNames () const |
Get a list of all available type names in all connected archives, and their archive/type id pair. More... | |
std::unordered_map< std::string, std::pair< std::string, std::string > > | GetAssociatedTypeArchiveTypes () const |
Get a list of all types in the analysis that are associated with a specific type archive. More... | |
std::unordered_map< std::string, std::string > | GetAssociatedTypesFromArchive (const std::string &archive) const |
Get a list of all types in the analysis that are associated with a specific type archive. More... | |
std::optional< std::pair< std::string, std::string > > | GetAssociatedTypeArchiveTypeTarget (const std::string &id) const |
Determine the target archive / type id of a given analysis type. More... | |
std::optional< std::string > | GetAssociatedTypeArchiveTypeSource (const std::string &archiveId, const std::string &archiveTypeId) const |
Determine the local source type for a given archive type. More... | |
BNSyncStatus | GetTypeArchiveSyncStatus (const std::string &typeId) const |
Get the current status of any changes pending in a given type. More... | |
bool | DisassociateTypeArchiveType (const std::string &typeId) |
Disassociate an associated type, so that it will no longer receive updates from its connected type archive. More... | |
bool | PullTypeArchiveTypes (const std::string &archiveId, const std::unordered_set< std::string > &archiveTypeIds, std::unordered_map< std::string, std::string > &updatedTypes) |
Pull a collection of types from a type archive, associating with them and any dependencies. More... | |
bool | PushTypeArchiveTypes (const std::string &archiveId, const std::unordered_set< std::string > &typeIds, std::unordered_map< std::string, std::string > &updatedTypes) |
Push a collection of types, and all their dependencies, into a type archive. More... | |
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) |
bool | Search (const std::string &query, const std::function< bool(uint64_t offset, const DataBuffer &buffer)> &otherCallback) |
void | Reanalyze () |
Ref< Workflow > | GetWorkflow () const |
void | ShowPlainTextReport (const std::string &title, const std::string &contents) |
Displays contents to the user in the UI or on the command-line. More... | |
void | ShowMarkdownReport (const std::string &title, const std::string &contents, const std::string &plainText) |
Displays markdown contents to the user in the UI or on the command-line. More... | |
void | ShowHTMLReport (const std::string &title, const std::string &contents, const std::string &plainText) |
Displays HTML contents to the user in the UI or on the command-line. More... | |
void | ShowGraphReport (const std::string &title, FlowGraph *graph) |
Displays a flow graph in UI applications and nothing in command-line applications. More... | |
bool | GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title) |
Prompts the user to input an unsigned integer with the given prompt and title. More... | |
bool | GetAddressInput (uint64_t &result, const std::string &prompt, const std::string &title, uint64_t currentAddress) |
Prompts the user to input an unsigned integer with the given prompt and title. More... | |
MemoryMap * | GetMemoryMap () |
A mock object that is a placeholder during development of this feature. More... | |
void | AddAutoSegment (uint64_t start, uint64_t length, uint64_t dataOffset, uint64_t dataLength, uint32_t flags) |
Add an analysis segment that specifies how data from the raw file is mapped into a virtual address space. More... | |
void | RemoveAutoSegment (uint64_t start, uint64_t length) |
Removes an automatically generated segment from the current segment mapping. More... | |
void | AddUserSegment (uint64_t start, uint64_t length, uint64_t dataOffset, uint64_t dataLength, uint32_t flags) |
Creates a user-defined segment that specifies how data from the raw file is mapped into a virtual address space. More... | |
void | RemoveUserSegment (uint64_t start, uint64_t length) |
Removes a user-defined segment from th current segment mapping. More... | |
std::vector< Ref< Segment > > | GetSegments () |
Get the list of registered Segments. More... | |
Ref< Segment > | GetSegmentAt (uint64_t addr) |
Gets the Segment a given virtual address is located in. More... | |
bool | GetAddressForDataOffset (uint64_t offset, uint64_t &addr) |
Retrieves the virtual addreses that maps to the given file offset, if possible. More... | |
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) |
Creates an analysis-defined section that can help inform analysis by clarifying what types of data exist in what ranges. More... | |
void | RemoveAutoSection (const std::string &name) |
Remove an automatically defined section by name. More... | |
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) |
Creates a user-defined section that can help inform analysis by clarifying what types of data exist in what ranges. More... | |
void | RemoveUserSection (const std::string &name) |
Remove a user defined section by name. More... | |
std::vector< Ref< Section > > | GetSections () |
Get the list of defined sections. More... | |
std::vector< Ref< Section > > | GetSectionsAt (uint64_t addr) |
Get the list of sections containing addr . More... | |
Ref< Section > | GetSectionByName (const std::string &name) |
Get a Section by name. More... | |
std::vector< std::string > | GetUniqueSectionNames (const std::vector< std::string > &names) |
Create unique names for all items in the input list, modifying them if they are not unique. More... | |
std::string | GetCommentForAddress (uint64_t addr) const |
Get the comment placed at an address. More... | |
std::vector< uint64_t > | GetCommentedAddresses () const |
Get the list of commented addresses. More... | |
void | SetCommentForAddress (uint64_t addr, const std::string &comment) |
Set the comment at an address. More... | |
std::vector< BNAddressRange > | GetAllocatedRanges () |
Get the list of allocated ranges. More... | |
void | StoreMetadata (const std::string &key, Ref< Metadata > value, bool isAuto=false) |
Ref< Metadata > | QueryMetadata (const std::string &key) |
void | RemoveMetadata (const std::string &key) |
Ref< Metadata > | GetMetadata () |
Ref< Metadata > | GetAutoMetadata () |
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< Settings > | GetLoadSettings (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< NameSpace > | GetNameSpaces () const |
Returns a list of namespaces for the current BinaryView. More... | |
bool | HasSymbols () const |
Check whether this BinaryView has any defined symbols. More... | |
bool | HasDataVariables () const |
Check whether this BinaryView has any defined DataVariables. More... | |
Ref< Structure > | CreateStructureFromOffsetAccess (const QualifiedName &type, bool *newMemberAdded) const |
Confidence< Ref< Type > > | CreateStructureMemberFromAccess (const QualifiedName &name, uint64_t offset) const |
Ref< Logger > | CreateLogger (const std::string &name) |
Create a logger with a session ID tied to this BinaryView. More... | |
void | AddExpressionParserMagicValue (const std::string &name, uint64_t value) |
Add a magic value to the expression parser. More... | |
void | RemoveExpressionParserMagicValue (const std::string &name) |
Remove a magic value from the expression parser. More... | |
void | AddExpressionParserMagicValues (const std::vector< std::string > &names, const std::vector< uint64_t > &values) |
Add a list of magic value to the expression parser. More... | |
void | RemoveExpressionParserMagicValues (const std::vector< std::string > &names) |
Remove a list of magic value from the expression parser. More... | |
bool | GetExpressionParserMagicValue (const std::string &name, uint64_t *value) |
Get the value of an expression parser magic value. More... | |
Ref< ExternalLibrary > | AddExternalLibrary (const std::string &name, Ref< ProjectFile > backingFile, bool isAuto=false) |
void | RemoveExternalLibrary (const std::string &name) |
Ref< ExternalLibrary > | GetExternalLibrary (const std::string &name) |
std::vector< Ref< ExternalLibrary > > | GetExternalLibraries () |
Ref< ExternalLocation > | AddExternalLocation (Ref< Symbol > sourceSymbol, Ref< ExternalLibrary > library, std::optional< std::string > targetSymbol, std::optional< uint64_t > targetAddress, bool isAuto=false) |
void | RemoveExternalLocation (Ref< Symbol > sourceSymbol) |
Ref< ExternalLocation > | GetExternalLocation (Ref< Symbol > sourceSymbol) |
std::vector< Ref< ExternalLocation > > | GetExternalLocations () |
Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNBinaryView, BNNewViewReference, BNFreeBinaryView > | |
CoreRefCountObject () | |
virtual | ~CoreRefCountObject () |
BNBinaryView * | GetObject () const |
void | AddRef () |
void | Release () |
void | AddRefForRegistration () |
void | ReleaseForRegistration () |
void | AddRefForCallback () |
void | ReleaseForCallback () |
Static Public Member Functions | |
static NameSpace | GetInternalNameSpace () |
Internal namespace for the current BinaryView. More... | |
static NameSpace | GetExternalNameSpace () |
External namespace for the current BinaryView. More... | |
static bool | ParseExpression (Ref< BinaryView > view, const std::string &expression, uint64_t &offset, uint64_t here, std::string &errorString) |
Evaluates a string expression to an integer value. More... | |
Static Public Member Functions inherited from BinaryNinja::CoreRefCountObject< BNBinaryView, BNNewViewReference, BNFreeBinaryView > | |
static BNBinaryView * | GetObject (CoreRefCountObject *obj) |
static BNBinaryView * | GetObject (const 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) |
PerformWrite provides a mapping between the flat file and virtual offsets in the file. More... | |
virtual size_t | PerformInsert (uint64_t offset, const void *data, size_t len) |
PerformInsert provides a mapping between the flat file and virtual offsets in the file, inserting `len` bytes from `data` to virtual address `offset`. More... | |
virtual size_t | PerformRemove (uint64_t offset, uint64_t len) |
PerformRemove provides a mapping between the flat file and virtual offsets in the file, removing `len` bytes from virtual address `offset`. More... | |
virtual BNModificationStatus | PerformGetModification (uint64_t offset) |
PerformGetModification implements a query as to whether the virtual address `offset` is modified. More... | |
virtual bool | PerformIsValidOffset (uint64_t offset) |
PerformIsValidOffset implements a check as to whether a virtual address `offset` is valid. More... | |
virtual bool | PerformIsOffsetReadable (uint64_t offset) |
PerformIsOffsetReadable implements a check as to whether a virtual address is readable. More... | |
virtual bool | PerformIsOffsetWritable (uint64_t offset) |
PerformIsOffsetWritable implements a check as to whether a virtual address is writable. More... | |
virtual bool | PerformIsOffsetExecutable (uint64_t offset) |
PerformIsOffsetExecutable implements a check as to whether a virtual address is executable. More... | |
virtual bool | PerformIsOffsetBackedByFile (uint64_t offset) |
PerformIsOffsetBackedByFile implements a check as to whether a virtual address is backed by a file. More... | |
virtual uint64_t | PerformGetNextValidOffset (uint64_t offset) |
PerformGetNextValidOffset implements a query for the next valid readable, writable, or executable virtual memory address after `offset`. More... | |
virtual uint64_t | PerformGetStart () const |
PerformGetStart implements a query for the first readable, writable, or executable virtual address in the BinaryView. More... | |
virtual uint64_t | PerformGetLength () const |
virtual uint64_t | PerformGetEntryPoint () const |
virtual bool | PerformIsExecutable () const |
PerformIsExecutable implements a check which returns true if the BinaryView is executable. More... | |
virtual BNEndianness | PerformGetDefaultEndianness () const |
PerformGetDefaultEndianness implements a check which returns the Endianness of the BinaryView. More... | |
virtual bool | PerformIsRelocatable () const |
PerformIsRelocatable implements a check which returns true if the BinaryView is relocatable. More... | |
virtual size_t | PerformGetAddressSize () const |
PerformGetAddressSize implements a query for the address size for this BinaryView. More... | |
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) |
Protected Attributes | |
Ref< FileMetadata > | m_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 |
|
protected |
BinaryView constructor.
typeName | name of the BinaryView (e.g. ELF, PE, Mach-O, ...) |
file | a file to create a view from |
parentView | optional view that contains the raw data used by this view |
BinaryView::BinaryView | ( | BNBinaryView * | view | ) |
|
inlineprotectedvirtual |
PerformRead provides a mapping between the flat file and virtual offsets in the file.
dest | the address to write len number of bytes. |
offset | the virtual offset to find and read len bytes from |
len | the number of bytes to read from offset and write to dest |
|
inlineprotectedvirtual |
PerformWrite provides a mapping between the flat file and virtual offsets in the file.
offset | the virtual offset to find and write len bytes to |
data | the address to read len number of bytes from |
len | the number of bytes to read from data and write to offset |
|
inlineprotectedvirtual |
PerformInsert provides a mapping between the flat file and virtual offsets in the file, inserting `len` bytes from `data` to virtual address `offset`.
offset | the virtual offset to find and insert len bytes into |
data | the address to read len number of bytes from |
len | the number of bytes to read from data and insert at offset |
|
inlineprotectedvirtual |
PerformRemove provides a mapping between the flat file and virtual offsets in the file, removing `len` bytes from virtual address `offset`.
offset | the virtual offset to find and remove bytes from |
len | the number of bytes to be removed |
|
inlineprotectedvirtual |
PerformGetModification implements a query as to whether the virtual address `offset` is modified.
offset | a virtual address to be checked |
|
protectedvirtual |
PerformIsValidOffset implements a check as to whether a virtual address `offset` is valid.
offset | the virtual address to check |
|
protectedvirtual |
PerformIsOffsetReadable implements a check as to whether a virtual address is readable.
offset | the virtual address to check |
|
protectedvirtual |
PerformIsOffsetWritable implements a check as to whether a virtual address is writable.
offset | the virtual address to check |
|
protectedvirtual |
PerformIsOffsetExecutable implements a check as to whether a virtual address is executable.
offset | the virtual address to check |
|
protectedvirtual |
PerformIsOffsetBackedByFile implements a check as to whether a virtual address is backed by a file.
offset | the virtual address to check |
|
protectedvirtual |
PerformGetNextValidOffset implements a query for the next valid readable, writable, or executable virtual memory address after `offset`.
offset | a virtual address to start checking from |
|
inlineprotectedvirtual |
PerformGetStart implements a query for the first readable, writable, or executable virtual address in the BinaryView.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
PerformIsExecutable implements a check which returns true if the BinaryView is executable.
|
protectedvirtual |
PerformGetDefaultEndianness implements a check which returns the Endianness of the BinaryView.
|
protectedvirtual |
PerformIsRelocatable implements a check which returns true if the BinaryView is relocatable.
|
protectedvirtual |
PerformGetAddressSize implements a query for the address size for this BinaryView.
|
protectedvirtual |
|
protected |
|
protected |
void BinaryView::NotifyDataWritten | ( | uint64_t | offset, |
size_t | len | ||
) |
void BinaryView::NotifyDataInserted | ( | uint64_t | offset, |
size_t | len | ||
) |
void BinaryView::NotifyDataRemoved | ( | uint64_t | offset, |
uint64_t | len | ||
) |
|
inlinevirtual |
|
inline |
Ref< BinaryView > BinaryView::GetParentView | ( | ) | const |
string BinaryView::GetTypeName | ( | ) | const |
bool BinaryView::IsModified | ( | ) | const |
bool BinaryView::IsAnalysisChanged | ( | ) | const |
bool BinaryNinja::BinaryView::CreateDatabase | ( | const std::string & | path, |
Ref< SaveSettings > | settings = new SaveSettings() |
||
) |
Writes the current database (.bndb) out to the specified file.
path | path and filename to write the bndb to. Should have ".bndb" appended to it. |
settings | Special save options |
bool BinaryNinja::BinaryView::CreateDatabase | ( | const std::string & | path, |
const std::function< bool(size_t progress, size_t total)> & | progressCallback, | ||
Ref< SaveSettings > | settings = new SaveSettings() |
||
) |
Writes the current database (.bndb) out to the specified file.
path | path and filename to write the bndb to. Should have ".bndb" appended to it. |
progressCallback | callback function to send save progress to. |
settings | Special save options |
bool BinaryView::SaveAutoSnapshot | ( | Ref< SaveSettings > | settings = new SaveSettings() | ) |
bool BinaryNinja::BinaryView::SaveAutoSnapshot | ( | const std::function< bool(size_t progress, size_t total)> & | progressCallback, |
Ref< SaveSettings > | settings = new SaveSettings() |
||
) |
bool BinaryView::RunUndoableTransaction | ( | std::function< bool()> | func | ) |
Run a function in a context in which any changes made to analysis will be added to an undo state.
If the function returns false or throws an exception, any changes made within will be reverted.
func | Function to run in undo context |
std::exception | If the called function throws an exception |
string BinaryView::BeginUndoActions | ( | bool | anonymousAllowed = true | ) |
Start recording actions taken so they can be undone at some point.
anonymousAllowed | Legacy interop: prevent empty calls to CommitUndoActions from affecting this undo state. Specifically for RunUndoableTransaction. |
void BinaryView::CommitUndoActions | ( | const std::string & | id | ) |
Commit the actions taken since a call to BeginUndoActions.
id | Id of UndoEntry created by BeginUndoActions |
void BinaryView::RevertUndoActions | ( | const std::string & | id | ) |
Revert the actions taken since a call to BeginUndoActions.
id | Id of UndoEntry created by BeginUndoActions |
void BinaryView::ForgetUndoActions | ( | const std::string & | id | ) |
Forget the actions taken since a call to BeginUndoActions.
id | Id of UndoEntry created by BeginUndoActions |
bool BinaryView::CanUndo | ( | ) |
bool BinaryView::Undo | ( | ) |
Undo the last committed action in the undo database.
bool BinaryView::CanRedo | ( | ) |
bool BinaryView::Redo | ( | ) |
Redo the last committed action in the undo database.
string BinaryView::GetCurrentView | ( | ) |
uint64_t BinaryView::GetCurrentOffset | ( | ) |
Get the current offset in the current view.
bool BinaryView::Navigate | ( | const std::string & | view, |
uint64_t | offset | ||
) |
Navigate to the specified virtual address in the specified view.
view | View name. e.g. ``Linear:ELF``, ``Graph:PE`` |
offset | Virtual address to navigate to |
size_t BinaryView::Read | ( | void * | dest, |
uint64_t | offset, | ||
size_t | len | ||
) |
Read writes `len` bytes at virtual address `offset` to address `dest`.
dest | Virtual address to write to |
offset | virtual address to read from |
len | number of bytes to read |
DataBuffer BinaryView::ReadBuffer | ( | uint64_t | offset, |
size_t | len | ||
) |
ReadBuffer reads len bytes from a virtual address into a DataBuffer.
offset | virtual address to read from |
len | number of bytes to read |
size_t BinaryView::Write | ( | uint64_t | offset, |
const void * | data, | ||
size_t | len | ||
) |
Write writes `len` bytes data at address `dest` to virtual address `offset`.
offset | virtual address to write to |
data | address to read from |
len | number of bytes to write |
size_t BinaryView::WriteBuffer | ( | uint64_t | offset, |
const DataBuffer & | data | ||
) |
WriteBuffer writes the contents of a DataBuffer into a virtual address.
offset | virtual address to write to |
data | DataBuffer containing the bytes to write |
size_t BinaryView::Insert | ( | uint64_t | offset, |
const void * | data, | ||
size_t | len | ||
) |
Insert inserts `len` bytes data at address `dest` starting from virtual address `offset`.
offset | virtual address to start inserting from |
data | address to read from |
len | number of bytes to write |
size_t BinaryView::InsertBuffer | ( | uint64_t | offset, |
const DataBuffer & | data | ||
) |
InsertBuffer inserts the contents of a DataBuffer starting from a virtual address.
offset | virtual address to start inserting from |
data | DataBuffer containing the bytes to write |
size_t BinaryView::Remove | ( | uint64_t | offset, |
uint64_t | len | ||
) |
PerformRemove removes `len` bytes from virtual address `offset`.
offset | the virtual offset to find and remove bytes from |
len | the number of bytes to be removed |
vector< float > BinaryView::GetEntropy | ( | uint64_t | offset, |
size_t | len, | ||
size_t | blockSize | ||
) |
BNModificationStatus BinaryView::GetModification | ( | uint64_t | offset | ) |
GetModification checks whether the virtual address `offset` is modified.
offset | a virtual address to be checked |
vector< BNModificationStatus > BinaryView::GetModification | ( | uint64_t | offset, |
size_t | len | ||
) |
bool BinaryView::IsValidOffset | ( | uint64_t | offset | ) | const |
IsValidOffset checks whether a virtual address `offset` is valid.
offset | the virtual address to check |
bool BinaryView::IsOffsetReadable | ( | uint64_t | offset | ) | const |
IsOffsetReadable checks whether a virtual address is readable.
offset | the virtual address to check |
bool BinaryView::IsOffsetWritable | ( | uint64_t | offset | ) | const |
IsOffsetWritable checks whether a virtual address is writable.
offset | the virtual address to check |
bool BinaryView::IsOffsetExecutable | ( | uint64_t | offset | ) | const |
IsOffsetExecutable checks whether a virtual address is executable.
offset | the virtual address to check |
bool BinaryView::IsOffsetBackedByFile | ( | uint64_t | offset | ) | const |
IsOffsetBackedByFile checks whether a virtual address is backed by a file.
offset | the virtual address to check |
bool BinaryView::IsOffsetCodeSemantics | ( | uint64_t | offset | ) | const |
bool BinaryView::IsOffsetWritableSemantics | ( | uint64_t | offset | ) | const |
bool BinaryView::IsOffsetExternSemantics | ( | uint64_t | offset | ) | const |
uint64_t BinaryView::GetNextValidOffset | ( | uint64_t | offset | ) | const |
GetNextValidOffset implements a query for the next valid readable, writable, or executable virtual memory address after `offset`.
offset | a virtual address to start checking from |
uint64_t BinaryView::GetOriginalBase | ( | ) | const |
GetOriginalBase queries for the original image base in the BinaryView, unaffected by any rebasing operations.
void BinaryView::SetOriginalBase | ( | uint64_t | base | ) |
SetOriginalBase sets the original image base in the BinaryView, unaffected by any rebasing operations.
This is only intended to be used by Binary View implementations to provide this value. Regular users should NOT change this value.
base | the original image base of the binary view |
uint64_t BinaryView::GetStart | ( | ) | const |
GetStart queries for the first valid virtual address in the BinaryView.
uint64_t BinaryView::GetEnd | ( | ) | const |
GetEnd queries for the end virtual address of the BinaryView.
uint64_t BinaryView::GetLength | ( | ) | const |
GetLength queries for the total length of the BinaryView from start to end.
uint64_t BinaryView::GetEntryPoint | ( | ) | const |
GetEntryPoint returns the entry point of the executable in the BinaryView.
Ref< Architecture > BinaryView::GetDefaultArchitecture | ( | ) | const |
GetDefaultArchitecture returns the current "default architecture" for the BinaryView.
void BinaryView::SetDefaultArchitecture | ( | Architecture * | arch | ) |
SetDefaultArchitecture allows setting the default architecture for the BinaryView.
arch | the new default architecture |
GetDefaultPlatform returns the current default platform for the BinaryView.
void BinaryView::SetDefaultPlatform | ( | Platform * | platform | ) |
SetDefaultPlatform allows setting the default platform for the BinaryView.
arch | the new default platform |
BNEndianness BinaryView::GetDefaultEndianness | ( | ) | const |
GetDefaultEndianness returns the default endianness for the BinaryView.
bool BinaryView::IsRelocatable | ( | ) | const |
Whether the binary is relocatable.
size_t BinaryView::GetAddressSize | ( | ) | const |
Address size of the binary.
bool BinaryView::IsExecutable | ( | ) | const |
Whether the binary is an executable.
bool BinaryView::Save | ( | FileAccessor * | file | ) |
Save the original binary file to a FileAccessor.
file | a FileAccessor pointing to the location to save the binary |
bool BinaryNinja::BinaryView::Save | ( | const std::string & | path | ) |
Save the original binary file to the provided destination.
path | destination path and filename of the file to be written |
void BinaryView::DefineRelocation | ( | Architecture * | arch, |
BNRelocationInfo & | info, | ||
uint64_t | target, | ||
uint64_t | reloc | ||
) |
void BinaryView::DefineRelocation | ( | Architecture * | arch, |
BNRelocationInfo & | info, | ||
Ref< Symbol > | target, | ||
uint64_t | reloc | ||
) |
vector< pair< uint64_t, uint64_t > > BinaryView::GetRelocationRanges | ( | ) | const |
vector< pair< uint64_t, uint64_t > > BinaryView::GetRelocationRangesAtAddress | ( | uint64_t | addr | ) | const |
bool BinaryView::RangeContainsRelocation | ( | uint64_t | addr, |
size_t | size | ||
) | const |
std::vector< Ref< Relocation > > BinaryView::GetRelocationsAt | ( | uint64_t | addr | ) | const |
void BinaryView::RegisterNotification | ( | BinaryDataNotification * | notify | ) |
Provides a mechanism for receiving callbacks for various analysis events.
notify | An instance of a class Subclassing BinaryDataNotification |
void BinaryView::UnregisterNotification | ( | BinaryDataNotification * | notify | ) |
Unregister a notification passed to RegisterNotification.
notify | An instance of a class Subclassing BinaryDataNotification |
void BinaryView::AddAnalysisOption | ( | const std::string & | name | ) |
Adds an analysis option.
Analysis options elaborate the analysis phase. The user must start analysis by calling either UpdateAnalysis or UpdateAnalysisAndWait
name | Name of the analysis option. Available options are "linearsweep" and "signaturematcher" |
Ref< Function > BinaryView::AddFunctionForAnalysis | ( | Platform * | platform, |
uint64_t | addr, | ||
bool | autoDiscovered = false , |
||
Type * | type = nullptr |
||
) |
Add a new function of the given platform at the virtual address.
platform | Platform for the function to be loaded |
addr | Virtual adddress of the function to be loaded |
autoDiscovered | true if function was automatically discovered, false if created by user |
type | optional function type |
void BinaryView::AddEntryPointForAnalysis | ( | Platform * | platform, |
uint64_t | start | ||
) |
adds an virtual address to start analysis from for a given platform
platform | Platform for the entry point analysis |
start | virtual address to start analysis from |
void BinaryView::AddToEntryFunctions | ( | Function * | func | ) |
adds an function to all entry function list
func | Function to add |
void BinaryView::RemoveAnalysisFunction | ( | Function * | func, |
bool | updateRefs = false |
||
) |
removes a function from the list of functions
func | Function to be removed |
updateRefs | automatically update other functions that were referenced |
Add a new user function of the given platform at the virtual address.
platform | Platform for the function to be loaded |
addr | Virtual adddress of the function to be loaded |
void BinaryView::RemoveUserFunction | ( | Function * | func | ) |
removes a user function from the list of functions
func | Function to be removed |
bool BinaryView::HasInitialAnalysis | ( | ) |
check for the presence of an initial analysis in this BinaryView.
void BinaryView::SetAnalysisHold | ( | bool | enable | ) |
Controls the analysis hold for this BinaryView.
Enabling analysis hold defers all future analysis updates, therefore causing UpdateAnalysis and UpdateAnalysisAndWait to take no action.
enable | Whether to enable or disable the analysis hold |
void BinaryView::UpdateAnalysisAndWait | ( | ) |
start the analysis running and dont return till it is complete
Analysis of BinaryViews does not occur automatically, the user must start analysis by calling either UpdateAnalysis or UpdateAnalysisAndWait. An analysis update **must** be run after changes are made which could change analysis results such as adding functions.
void BinaryView::UpdateAnalysis | ( | ) |
asynchronously starts the analysis running and returns immediately.
Analysis of BinaryViews does not occur automatically, the user must start analysis by calling either UpdateAnalysis or UpdateAnalysisAndWait. An analysis update **must** be run after changes are made which could change analysis results such as adding functions.
void BinaryView::AbortAnalysis | ( | ) |
Abort the currently running analysis.
This method should be considered non-recoverable and generally only used when shutdown is imminent after stopping.
void BinaryView::DefineDataVariable | ( | uint64_t | addr, |
const Confidence< Ref< Type > > & | type | ||
) |
Define a DataVariable at a given address with a set type.
addr | virtual address to define the DataVariable at |
type | Type for the DataVariable |
void BinaryView::DefineUserDataVariable | ( | uint64_t | addr, |
const Confidence< Ref< Type > > & | type | ||
) |
Define a user DataVariable at a given address with a set type.
addr | virtual address to define the DataVariable at |
type | Type for the DataVariable |
void BinaryView::UndefineDataVariable | ( | uint64_t | addr | ) |
Undefine a DataVariable at a given address.
addr | virtual address of the DataVariable |
void BinaryView::UndefineUserDataVariable | ( | uint64_t | addr | ) |
Undefine a user DataVariable at a given address.
addr | virtual address of the DataVariable |
map< uint64_t, DataVariable > BinaryView::GetDataVariables | ( | ) |
Get a map of DataVariables defined in the current BinaryView.
bool BinaryView::GetDataVariableAtAddress | ( | uint64_t | addr, |
DataVariable & | var | ||
) |
Get a DataVariable at a given address.
addr | Address for the DataVariable |
var | Reference to a DataVariable class to write to |
Get a list of functions within this BinaryView.
bool BinaryView::HasFunctions | ( | ) | const |
Check whether the BinaryView has any functions defined.
Get a list of functions defined at an address.
addr | Starting virtual address for the function |
Get a list of functions containing an address.
addr | Address to check |
Get the function defined as the Analysis entry point for the view.
Get all entry functions (including user-defined ones)
Ref< BasicBlock > BinaryView::GetRecentBasicBlockForAddress | ( | uint64_t | addr | ) |
Get most recently used Basic Block containing a virtual address.
addr | Address within the BasicBlock |
vector< Ref< BasicBlock > > BinaryView::GetBasicBlocksForAddress | ( | uint64_t | addr | ) |
Get a list of Basic Blocks containing a virtual address.
addr | Address to check |
vector< Ref< BasicBlock > > BinaryView::GetBasicBlocksStartingAtAddress | ( | uint64_t | addr | ) |
Get a list of basic blocks starting at a virtual address.
addr | Address to check |
vector< ReferenceSource > BinaryView::GetCodeReferences | ( | uint64_t | addr | ) |
Get a list of references made from code (instructions) to a virtual address.
addr | Address to check |
vector< ReferenceSource > BinaryView::GetCodeReferences | ( | uint64_t | addr, |
uint64_t | len | ||
) |
Get a list of references from code (instructions) to a range of addresses.
addr | Address to check |
len | Length of query |
vector< uint64_t > BinaryView::GetCodeReferencesFrom | ( | ReferenceSource | src | ) |
Get code references made by a particular "ReferenceSource".
A ReferenceSource contains a given function, architecture of that function, and an address within it.
src | reference source |
vector< uint64_t > BinaryView::GetCodeReferencesFrom | ( | ReferenceSource | src, |
uint64_t | len | ||
) |
Get code references from a range of addresses.
A ReferenceSource contains a given function, architecture of that function, and an address within it.
The 2nd parameter is the length of the range. The start of the range is set in ReferenceSource::addr
src | reference source |
len | Length of query |
vector< uint64_t > BinaryView::GetDataReferences | ( | uint64_t | addr | ) |
Get references made by data ('DataVariables') to a virtual address.
addr | Address to check |
vector< uint64_t > BinaryView::GetDataReferences | ( | uint64_t | addr, |
uint64_t | len | ||
) |
Get references made by data ('DataVariables') in a given range, to a virtual address.
addr | Address to check |
len | Length of query |
vector< uint64_t > BinaryView::GetDataReferencesFrom | ( | uint64_t | addr | ) |
Get references made by data ('DataVariables') located at a virtual address.
src | reference source |
vector< uint64_t > BinaryView::GetDataReferencesFrom | ( | uint64_t | addr, |
uint64_t | len | ||
) |
Get references made by data ('DataVariables') located in a range of virtual addresses.
src | reference source |
len | Length of query |
void BinaryView::AddUserDataReference | ( | uint64_t | fromAddr, |
uint64_t | toAddr | ||
) |
Add a user Data Reference from a virtual address to another virtual address.
fromAddr | Address referencing the toAddr value |
toAddr | virtual address being referenced |
void BinaryView::RemoveUserDataReference | ( | uint64_t | fromAddr, |
uint64_t | toAddr | ||
) |
Remove a user Data Reference from a virtual address to another virtual address.
fromAddr | Address referencing the toAddr value |
toAddr | virtual address being referenced |
vector< ReferenceSource > BinaryView::GetCodeReferencesForType | ( | const QualifiedName & | type | ) |
Get code references to a Type.
type | QualifiedName for a Type |
vector< uint64_t > BinaryView::GetDataReferencesForType | ( | const QualifiedName & | type | ) |
Get data references to a Type.
type | QualifiedName for a Type |
vector< TypeReferenceSource > BinaryView::GetTypeReferencesForType | ( | const QualifiedName & | type | ) |
Get Type references to a Type.
type | QualifiedName for a Type |
vector< TypeFieldReference > BinaryView::GetCodeReferencesForTypeField | ( | const QualifiedName & | type, |
uint64_t | offset | ||
) |
Returns a list of references to a specific type field.
type | QualifiedName of the type |
offset | Offset of the field, relative to the start of the type |
vector< uint64_t > BinaryView::GetDataReferencesForTypeField | ( | const QualifiedName & | type, |
uint64_t | offset | ||
) |
Returns a list of virtual addresses of data which references the type type
.
Note, the returned addresses are the actual start of the queried type field. For example, suppose there is a DataVariable at 0x1000
that has type A
, and type A
contains type B
at offset 0x10
. Then GetDataReferencesForTypeField(bQualifiedName, 0x8)
will return 0x1018
for it.
type | QualifiedName of the type |
offset | Offset of the field, relative to the start of the type |
vector< uint64_t > BinaryView::GetDataReferencesFromForTypeField | ( | const QualifiedName & | type, |
uint64_t | offset | ||
) |
Returns a list of virtual addresses of data which are referenced from the type type
.
Only data referenced by structures with the __data_var_refs
attribute are included.
type | QualifiedName of the type |
offset | Offset of the field, relative to the start of the type |
vector< TypeReferenceSource > BinaryView::GetTypeReferencesForTypeField | ( | const QualifiedName & | type, |
uint64_t | offset | ||
) |
Returns a list of type references to a specific type field.
type | QualifiedName of the type |
offset | Offset of the field, relative to the start of the type |
vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFrom | ( | ReferenceSource | src | ) |
Returns a list of types referenced by code at ReferenceSource src
.
If no function is specified, references from all functions and containing the address will be returned. If no architecture is specified, the architecture of the function will be used.
src | Source of the reference to check |
vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFrom | ( | ReferenceSource | src, |
uint64_t | len | ||
) |
Returns a list of types referenced by code at ReferenceSource src
.
If no function is specified, references from all functions and containing the address will be returned. If no architecture is specified, the architecture of the function will be used.
src | Source location to check |
len | Length of the query |
vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFieldFrom | ( | ReferenceSource | src | ) |
Returns a list of type fields referenced by code at ReferenceSource src
.
If no function is specified, references from all functions and containing the address will be returned. If no architecture is specified, the architecture of the function will be used.
src | Source location to check |
vector< TypeReferenceSource > BinaryView::GetCodeReferencesForTypeFieldFrom | ( | ReferenceSource | src, |
uint64_t | len | ||
) |
Returns a list of type fields referenced by code at ReferenceSource src
.
If no function is specified, references from all functions and containing the address will be returned. If no architecture is specified, the architecture of the function will be used.
src | Source location to check |
len | Length of the query |
vector< uint64_t > BinaryView::GetAllFieldsReferenced | ( | const QualifiedName & | type | ) |
Returns a list of offsets in the QualifiedName specified by name, which are referenced by code.
type | Name of type to query for references |
std::map< uint64_t, std::vector< size_t > > BinaryView::GetAllSizesReferenced | ( | const QualifiedName & | type | ) |
Returns a map from field offset to a list of sizes of the accesses to the specified type.
type | Name of type to query for references |
std::map< uint64_t, std::vector< Confidence< Ref< Type > > > > BinaryView::GetAllTypesReferenced | ( | const QualifiedName & | type | ) |
Returns a map from field offset to a list of incoming types written to the specified type.
type | Name of type to query for references |
std::vector< size_t > BinaryView::GetSizesReferenced | ( | const QualifiedName & | type, |
uint64_t | offset | ||
) |
Returns a list of types related to the type field access.
type | Name of type to query for references |
offset | Offset of the field, relative to the start of the type |
std::vector< Confidence< Ref< Type > > > BinaryView::GetTypesReferenced | ( | const QualifiedName & | type, |
uint64_t | offset | ||
) |
Returns a list of types referenced by a particular type field.
type | Name of type to query for references |
offset | Offset of the field, relative to the start of the type |
unordered_set< QualifiedName > BinaryView::GetOutgoingDirectTypeReferences | ( | const QualifiedName & | type | ) |
unordered_set< QualifiedName > BinaryView::GetOutgoingRecursiveTypeReferences | ( | const QualifiedName & | type | ) |
std::unordered_set< QualifiedName > BinaryNinja::BinaryView::GetOutgoingRecursiveTypeReferences | ( | const std::unordered_set< QualifiedName > & | types | ) |
unordered_set< QualifiedName > BinaryView::GetIncomingDirectTypeReferences | ( | const QualifiedName & | type | ) |
unordered_set< QualifiedName > BinaryView::GetIncomingRecursiveTypeReferences | ( | const QualifiedName & | type | ) |
std::unordered_set< QualifiedName > BinaryNinja::BinaryView::GetIncomingRecursiveTypeReferences | ( | const std::unordered_set< QualifiedName > & | types | ) |
Ref< Structure > BinaryNinja::BinaryView::CreateStructureBasedOnFieldAccesses | ( | const QualifiedName & | type | ) |
vector< uint64_t > BinaryView::GetCallees | ( | ReferenceSource | addr | ) |
Returns a list of virtual addresses called by the call site in the ReferenceSource.
If no function is specified, call sites from all functions and containing the address will be considered. If no architecture is specified, the architecture of the function will be used.
addr | ReferenceSource to get callees to |
vector< ReferenceSource > BinaryView::GetCallers | ( | uint64_t | addr | ) |
Returns a list of ReferenceSource objects (xrefs or cross-references) that call the provided virtual address.
In this case, tail calls, jumps, and ordinary calls are considered.
addr | Address to check callers for |
Ref< Symbol > BinaryView::GetSymbolByAddress | ( | uint64_t | addr, |
const NameSpace & | nameSpace = NameSpace() |
||
) |
Returns the Symbol at the provided virtual address.
addr | Virtual address to query for symbol |
nameSpace | The optional namespace of the symbols to retrieve |
Ref< Symbol > BinaryView::GetSymbolByRawName | ( | const std::string & | name, |
const NameSpace & | nameSpace = NameSpace() |
||
) |
Retrieves a Symbol object for the given a raw (mangled) name.
name | Raw (mangled) name of the symbol |
nameSpace | The optional namespace of the symbols to retrieve |
vector< Ref< Symbol > > BinaryView::GetSymbolsByName | ( | const std::string & | name, |
const NameSpace & | nameSpace = NameSpace() |
||
) |
Retrieves a list of symbols with a given name.
name | Name to search for |
nameSpace | The optional namespace of the symbols to retrieve |
vector< Ref< Symbol > > BinaryView::GetSymbolsByRawName | ( | const std::string & | name, |
const NameSpace & | nameSpace = NameSpace() |
||
) |
Retrieves the list of all Symbol objects with a given raw name.
name | RawName to search for |
nameSpace | The optional namespace of the symbols to retrieve |
Retrieves the list of all Symbol objects.
nameSpace | The optional namespace of the symbols to retrieve |
vector< Ref< Symbol > > BinaryView::GetSymbols | ( | uint64_t | start, |
uint64_t | len, | ||
const NameSpace & | nameSpace = NameSpace() |
||
) |
Retrieves a list of symbols in a given range.
start | Virtual address start of the range |
len | Length of the range |
nameSpace | The optional namespace of the symbols to retrieve |
vector< Ref< Symbol > > BinaryView::GetSymbolsOfType | ( | BNSymbolType | type, |
const NameSpace & | nameSpace = NameSpace() |
||
) |
Retrieves a list of all Symbol objects of the provided symbol type.
type | The symbol type |
nameSpace | The optional namespace of the symbols to retrieve |
vector< Ref< Symbol > > BinaryView::GetSymbolsOfType | ( | BNSymbolType | type, |
uint64_t | start, | ||
uint64_t | len, | ||
const NameSpace & | nameSpace = NameSpace() |
||
) |
Retrieves a list of all Symbol objects of the provided symbol type in the given range.
type | The symbol type |
start | Virtual address start of the range |
len | Length of the range |
nameSpace | The optional namespace of the symbols to retrieve |
std::vector< Ref< Symbol > > BinaryView::GetVisibleSymbols | ( | const NameSpace & | nameSpace = NameSpace() | ) |
Get the list of visible symbols.
nameSpace | The optional namespace of the symbols to retrieve |
Undefine an automatically defined symbol.
sym | The symbol to undefine |
Define a user symbol.
sym | Symbol to define |
Undefine a user symbol.
sym | Symbol to undefinee |
The current debug info object for this binary view.
Sets the debug info and applies its contents to the current BinaryView.
newDebugInfo |
Sets the debug info for the current binary view.
newDebugInfo | Sets the debug info for the current binary view |
bool BinaryView::IsApplyingDebugInfo | ( | ) | const |
Determine is a debug info object is currently being applied.
void BinaryView::BeginBulkModifySymbols | ( | ) |
void BinaryView::EndBulkModifySymbols | ( | ) |
Ref< TagType > BinaryView::GetTagType | ( | const std::string & | name, |
TagType::Type | type | ||
) |
Ref< TagType > BinaryView::GetTagTypeByName | ( | const std::string & | name, |
TagType::Type | type | ||
) |
Ref< TagType > BinaryView::GetTagTypeById | ( | const std::string & | id, |
TagType::Type | type | ||
) |
Get the list of all defined TagTypes.
Add a Tag.
tag | The tag to add |
user | Whether this was added by a user or automatically by analysis |
Remove a tag.
tag | The tag to remove |
user | Whether the tag being removed is a user tag |
Get a tag by its ID.
tagId | the tag ID |
std::vector< TagReference > BinaryView::GetAllTagReferences | ( | ) |
std::vector< TagReference > BinaryView::GetAllAddressTagReferences | ( | ) |
std::vector< TagReference > BinaryView::GetAllFunctionTagReferences | ( | ) |
std::vector< TagReference > BinaryView::GetAllTagReferencesOfType | ( | Ref< TagType > | tagType | ) |
std::vector< TagReference > BinaryView::GetTagReferencesOfType | ( | Ref< TagType > | tagType | ) |
std::vector< TagReference > BinaryView::GetDataTagReferences | ( | ) |
std::vector< TagReference > BinaryView::GetAutoDataTagReferences | ( | ) |
std::vector< TagReference > BinaryView::GetUserDataTagReferences | ( | ) |
std::vector< Ref< Tag > > BinaryView::GetAutoDataTagsOfType | ( | uint64_t | addr, |
Ref< TagType > | tagType | ||
) |
std::vector< Ref< Tag > > BinaryView::GetUserDataTagsOfType | ( | uint64_t | addr, |
Ref< TagType > | tagType | ||
) |
std::vector< TagReference > BinaryView::GetDataTagsInRange | ( | uint64_t | start, |
uint64_t | end | ||
) |
std::vector< TagReference > BinaryView::GetAutoDataTagsInRange | ( | uint64_t | start, |
uint64_t | end | ||
) |
std::vector< TagReference > BinaryView::GetUserDataTagsInRange | ( | uint64_t | start, |
uint64_t | end | ||
) |
void BinaryView::RemoveTagReference | ( | const TagReference & | ref | ) |
Ref< Tag > BinaryView::CreateAutoDataTag | ( | uint64_t | addr, |
const std::string & | tagTypeName, | ||
const std::string & | data, | ||
bool | unique = false |
||
) |
Ref< Tag > BinaryView::CreateUserDataTag | ( | uint64_t | addr, |
const std::string & | tagTypeName, | ||
const std::string & | data, | ||
bool | unique = false |
||
) |
Ref< Tag > BinaryView::CreateAutoDataTag | ( | uint64_t | addr, |
Ref< TagType > | tagType, | ||
const std::string & | data, | ||
bool | unique = false |
||
) |
Ref< Tag > BinaryView::CreateUserDataTag | ( | uint64_t | addr, |
Ref< TagType > | tagType, | ||
const std::string & | data, | ||
bool | unique = false |
||
) |
Lookup a component by its GUID.
guid | GUID of the component to look up |
Lookup a component by its pathname.
All lookups are absolute from the root component, and are case-sensitive. Pathnames are delimited with "/"
Lookups are done using the display name of the component, which is liable to change when it or its siblings are moved around.
path | Path of the desired component |
Get the root component for the BinaryView (read-only)
This Component cannot be removed, and houses all unparented Components.
Create a component.
This component will be added to the root component and initialized with the name "Component"
Create a component as a subcomponent of the component with a given Guid.
This component will be initialized with the name "Component"
parentGUID | Guid of the component this component will be added to |
Ref< Component > BinaryView::CreateComponentWithName | ( | std::string | name, |
std::string | parentGUID = {} |
||
) |
Create a component with a given name and optional parent.
name | Name to initialize the component with |
parentGUID | Optional Guid of the component this component will be added to |
Create a component with a given name and parent.
name | Name to initialize the component with |
parentGUID | Guid of the component this component will be added to |
Remove a component from the tree entirely.
This will also by nature remove all subcomponents.
component | Component to remove |
bool BinaryView::RemoveComponent | ( | std::string | guid | ) |
Remove a component from the tree entirely.
This will also by nature remove all subcomponents.
guid | Guid of the Component to remove |
std::vector< Ref< Component > > BinaryView::GetFunctionParentComponents | ( | Ref< Function > | function | ) | const |
std::vector< Ref< Component > > BinaryView::GetDataVariableParentComponents | ( | DataVariable | var | ) | const |
std::optional< BNStringType > BinaryView::CheckForStringAnnotationType | ( | uint64_t | addr, |
std::string & | value, | ||
bool | allowShortStrings, | ||
bool | allowLargeStrings, | ||
size_t | childWidth | ||
) |
Heuristically determine if a string exists at the given address.
This API checks for the following settings: "analysis.unicode.utf8" - default true enables UTF-8 string detection "analysis.unicode.utf16" - default true enables UTF-16 string detection "analysis.unicode.utf32" - default true enables UTF-32 string detection "analysis.unicode.blocks" - selects the Unicode blocks to use for detection
addr | Address to check |
value | String value to populate |
allowShortStrings | Whether to allow short strings < 4 characters |
allowLargeStrings | If false strings must be less than "rendering.strings.maxAnnotationLength" (default 32) If true strings must be less than "analysis.limits.maxStringLength" (default 16384) |
childWidth | Width of the characters |
bool BinaryView::CanAssemble | ( | Architecture * | arch | ) |
Check whether the given architecture supports assembling instructions.
arch | Architecture to check |
bool BinaryView::IsNeverBranchPatchAvailable | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Check whether the "Never Branch" patch is available for a given architecture at a given address.
arch | Architecture to check |
addr | Address of the instruction to be patched |
bool BinaryView::IsAlwaysBranchPatchAvailable | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Check whether the "Always Branch" patch is available for a given architecture at a given address.
arch | Architecture to check |
addr | Address of the instruction to be patched |
bool BinaryView::IsInvertBranchPatchAvailable | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Check whether the "Invert Branch" patch is available for a given architecture at a given address.
arch | Architecture to check |
addr | Address of the instruction to be patched |
bool BinaryView::IsSkipAndReturnZeroPatchAvailable | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Check whether the "Skip and Return Zero" patch is available for a given architecture at a given address.
arch | Architecture to check |
addr | Address of the instruction to be patched |
bool BinaryView::IsSkipAndReturnValuePatchAvailable | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Check whether the "Skip and Return Value" patch is available for a given architecture at a given address.
arch | Architecture to check |
addr | Address of the instruction to be patched |
bool BinaryView::ConvertToNop | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Convert the instruction at the given address to a nop.
arch | Architecture of the instruction to convert |
addr | Address of the instruction to be patched |
bool BinaryView::AlwaysBranch | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Convert the conditional branch at the given address to always branch.
arch | Architecture of the instruction to convert |
addr | Address of the instruction to be patched |
bool BinaryView::InvertBranch | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Convert the conditional branch at the given address to branch under inverted conditions.
arch | Architecture of the instruction to convert |
addr | Address of the instruction to be patched |
bool BinaryView::SkipAndReturnValue | ( | Architecture * | arch, |
uint64_t | addr, | ||
uint64_t | value | ||
) |
Convert the given instruction to skip the rest of the function and return 0.
arch | Architecture of the instruction to convert |
addr | Address of the instruction to be patched |
value | Value to return |
size_t BinaryView::GetInstructionLength | ( | Architecture * | arch, |
uint64_t | addr | ||
) |
Get the length of the instruction at a given address.
arch | Architecture of the instruction |
addr | Address of the start of the instruction |
bool BinaryView::GetStringAtAddress | ( | uint64_t | addr, |
BNStringReference & | strRef | ||
) |
Get the string at an address.
[in] | addr | Address of the string |
[out] | strRef | Reference to a StringReference the string reference will be writen to. |
vector< BNStringReference > BinaryView::GetStrings | ( | ) |
Get the list of strings located within the view.
vector< BNStringReference > BinaryView::GetStrings | ( | uint64_t | start, |
uint64_t | len | ||
) |
Get the list of strings located within a range.
start | Starting virtual address of the range |
len | Length of the range |
Ref< AnalysisCompletionEvent > BinaryView::AddAnalysisCompletionEvent | ( | const std::function< void()> & | callback | ) |
Sets up a call back function to be called when analysis has been completed.
This is helpful when using `UpdateAnalysis` which does not wait for analysis completion before returning.
The callee of this function is not responsible for maintaining the lifetime of the returned AnalysisCompletionEvent object
callback | A function to be called with no parameters when analysis has completed. |
AnalysisInfo BinaryView::GetAnalysisInfo | ( | ) |
BNAnalysisProgress BinaryView::GetAnalysisProgress | ( | ) |
Ref< |