summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorGlenn Smith <couleeapps@gmail.com>2019-05-28 13:47:14 -0400
committerGlenn Smith <glenn@vector35.com>2019-08-01 18:36:03 -0400
commit087fdd83b85dd894d5b895557a378bb01828d0ff (patch)
tree8f9846be65885fa97cf934aa2e7dbd22cf150765 /binaryninjacore.h
parent9bb1a15b800da0ac5b60c40e3b10321e4efc5a1b (diff)
Tags
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 903e6a45..7dc1f8c2 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -136,6 +136,8 @@ extern "C"
struct BNMediumLevelILFunction;
struct BNType;
struct BNStructure;
+ struct BNTagType;
+ struct BNTag;
struct BNNamedTypeReference;
struct BNEnumeration;
struct BNCallingConvention;
@@ -238,6 +240,7 @@ extern "C"
FieldNameToken = 21,
NameSpaceToken = 22,
NameSpaceSeparatorToken = 23,
+ TagToken = 24,
// The following are output by the analysis system automatically, these should
// not be used directly by the architecture plugins
CodeSymbolToken = 64,
@@ -1198,6 +1201,7 @@ extern "C"
BNInstructionTextTokenType type;
char* text;
uint64_t value;
+ uint64_t width;
size_t size, operand;
BNInstructionTextTokenContext context;
uint8_t confidence;
@@ -1361,6 +1365,8 @@ extern "C"
BNInstructionTextToken* tokens;
size_t count;
BNHighlightColor highlight;
+ BNTag** tags;
+ size_t tagCount;
};
struct BNLinearDisassemblyLine
@@ -1386,6 +1392,30 @@ extern "C"
uint64_t addr;
};
+ enum BNTagTypeType
+ {
+ UserTagType,
+ NotificationTagType,
+ BookmarksTagType
+ };
+
+ enum BNTagReferenceType
+ {
+ AddressTagReference,
+ FunctionTagReference,
+ DataTagReference
+ };
+
+ struct BNTagReference
+ {
+ BNTagReferenceType refType;
+ bool autoDefined;
+ BNTag* tag;
+ BNArchitecture* arch;
+ BNFunction* func;
+ uint64_t addr;
+ };
+
struct BNUndoAction
{
BNActionType type;
@@ -2902,6 +2932,73 @@ extern "C"
BINARYNINJACOREAPI void BNSetAutoBasicBlockHighlight(BNBasicBlock* block, BNHighlightColor color);
BINARYNINJACOREAPI void BNSetUserBasicBlockHighlight(BNBasicBlock* block, BNHighlightColor color);
+ BINARYNINJACOREAPI BNTagType* BNCreateTagType(BNBinaryView* view);
+ BINARYNINJACOREAPI BNTagType* BNNewTagTypeReference(BNTagType* tagType);
+ BINARYNINJACOREAPI void BNFreeTagType(BNTagType* tagType);
+ BINARYNINJACOREAPI void BNFreeTagTypeList(BNTagType** tagTypes, size_t count);
+ BINARYNINJACOREAPI BNBinaryView* BNTagTypeGetView(BNTagType* tagType);
+ BINARYNINJACOREAPI char* BNTagTypeGetName(BNTagType* tagType);
+ BINARYNINJACOREAPI void BNTagTypeSetName(BNTagType* tagType, const char* name);
+ BINARYNINJACOREAPI char* BNTagTypeGetIcon(BNTagType* tagType);
+ BINARYNINJACOREAPI void BNTagTypeSetIcon(BNTagType* tagType, const char* icon);
+ BINARYNINJACOREAPI bool BNTagTypeGetVisible(BNTagType* tagType);
+ BINARYNINJACOREAPI void BNTagTypeSetVisible(BNTagType* tagType, bool visible);
+ BINARYNINJACOREAPI BNTagTypeType BNTagTypeGetType(BNTagType* tagType);
+ BINARYNINJACOREAPI void BNTagTypeSetType(BNTagType* tagType, BNTagTypeType type);
+
+ BINARYNINJACOREAPI BNTag* BNCreateTag(BNTagType* type, const char* data);
+ BINARYNINJACOREAPI BNTag* BNNewTagReference(BNTag* tag);
+ BINARYNINJACOREAPI void BNFreeTag(BNTag* tag);
+ BINARYNINJACOREAPI void BNFreeTagList(BNTag** tags, size_t count);
+ BINARYNINJACOREAPI BNTagType* BNTagGetType(BNTag* tag);
+ BINARYNINJACOREAPI char* BNTagGetData(BNTag* tag);
+ BINARYNINJACOREAPI void BNTagSetData(BNTag* tag, const char* data);
+
+ BINARYNINJACOREAPI void BNAddTagType(BNBinaryView* view, BNTagType* tagType);
+ BINARYNINJACOREAPI void BNRemoveTagType(BNBinaryView* view, BNTagType* tagType);
+ BINARYNINJACOREAPI BNTagType* BNGetTagType(BNBinaryView* view, const char* name);
+ BINARYNINJACOREAPI BNTagType* BNGetTagTypeWithType(BNBinaryView* view, const char* name, BNTagTypeType type);
+ BINARYNINJACOREAPI BNTagType** BNGetTagTypes(BNBinaryView* view, size_t* count);
+
+ BINARYNINJACOREAPI void BNAddTag(BNBinaryView* view, BNTag* tag);
+ BINARYNINJACOREAPI BNTag* BNGetTag(BNBinaryView* view, uint64_t tagId);
+ BINARYNINJACOREAPI void BNRemoveTag(BNBinaryView* view, BNTag* tag);
+
+ BINARYNINJACOREAPI BNTagReference* BNGetAllTagReferences(BNBinaryView* view, size_t* count);
+ BINARYNINJACOREAPI BNTagReference* BNGetAllAddressTagReferences(BNBinaryView* view, size_t* count);
+ BINARYNINJACOREAPI BNTagReference* BNGetAllFunctionTagReferences(BNBinaryView* view, size_t* count);
+ BINARYNINJACOREAPI BNTagReference* BNGetAllTagReferencesOfType(BNBinaryView* view, BNTagType* tagType, size_t* count);
+ BINARYNINJACOREAPI BNTagReference* BNGetTagReferencesOfType(BNBinaryView* view, BNTagType* tagType, size_t* count);
+ BINARYNINJACOREAPI BNTagReference* BNGetDataTagReferences(BNBinaryView* view, size_t* count);
+ BINARYNINJACOREAPI void BNFreeTagReferences(BNTagReference* refs, size_t count);
+ BINARYNINJACOREAPI BNTag** BNGetDataTags(BNBinaryView* view, uint64_t addr, size_t* count);
+ BINARYNINJACOREAPI BNTag** BNGetDataTagsOfType(BNBinaryView* view, uint64_t addr, BNTagType* tagType, size_t* count);
+ BINARYNINJACOREAPI BNTag** BNGetDataTagsInRange(BNBinaryView* view, uint64_t start, uint64_t end, size_t* count);
+ BINARYNINJACOREAPI void BNAddAutoDataTag(BNBinaryView* view, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveAutoDataTag(BNBinaryView* view, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNAddUserDataTag(BNBinaryView* view, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveUserDataTag(BNBinaryView* view, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveTagReference(BNBinaryView* view, BNTagReference ref);
+
+ BINARYNINJACOREAPI BNTagReference* BNGetFunctionAllTagReferences(BNFunction* func, size_t* count);
+ BINARYNINJACOREAPI BNTagReference* BNGetFunctionTagReferencesOfType(BNFunction* func, BNTagType* tagType, size_t* count);
+
+ BINARYNINJACOREAPI BNTagReference* BNGetAddressTagReferences(BNFunction* func, size_t* count);
+ BINARYNINJACOREAPI BNTag** BNGetAddressTags(BNFunction* func, BNArchitecture* arch, uint64_t addr, size_t* count);
+ BINARYNINJACOREAPI BNTag** BNGetAddressTagsOfType(BNFunction* func, BNArchitecture* arch, uint64_t addr, BNTagType* tagType, size_t* count);
+ BINARYNINJACOREAPI void BNAddAutoAddressTag(BNFunction* func, BNArchitecture* arch, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveAutoAddressTag(BNFunction* func, BNArchitecture* arch, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNAddUserAddressTag(BNFunction* func, BNArchitecture* arch, uint64_t addr, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveUserAddressTag(BNFunction* func, BNArchitecture* arch, uint64_t addr, BNTag* tag);
+
+ BINARYNINJACOREAPI BNTagReference* BNGetFunctionTagReferences(BNFunction* func, size_t* count);
+ BINARYNINJACOREAPI BNTag** BNGetFunctionTags(BNFunction* func, size_t* count);
+ BINARYNINJACOREAPI BNTag** BNGetFunctionTagsOfType(BNFunction* func, BNTagType* tagType, size_t* count);
+ BINARYNINJACOREAPI void BNAddAutoFunctionTag(BNFunction* func, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveAutoFunctionTag(BNFunction* func, BNTag* tag);
+ BINARYNINJACOREAPI void BNAddUserFunctionTag(BNFunction* func, BNTag* tag);
+ BINARYNINJACOREAPI void BNRemoveUserFunctionTag(BNFunction* func, BNTag* tag);
+
BINARYNINJACOREAPI BNPerformanceInfo* BNGetFunctionAnalysisPerformanceInfo(BNFunction* func, size_t* count);
BINARYNINJACOREAPI void BNFreeAnalysisPerformanceInfo(BNPerformanceInfo* info, size_t count);