summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorkat <kat@vector35.com>2023-01-03 14:29:32 -0500
committerkat <kat@vector35.com>2023-02-20 13:23:31 -0500
commitfcfa33a14fc309984880b535b9f9b4fcfc316466 (patch)
tree0d2b1c62e9939d357a508a446f440541709625e4 /binaryninjacore.h
parent982d90f20e400c7fe7b254eee31fe7eca4e11c2c (diff)
Allow DataVariables to be added to Components
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index f2cc350e..4f8a41d3 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -1461,6 +1461,8 @@ extern "C"
void (*componentRemoved)(void*ctxt, BNBinaryView* view, BNComponent* formerParent, BNComponent* component);
void (*componentFunctionAdded)(void*ctxt, BNBinaryView* view, BNComponent* component, BNFunction* function);
void (*componentFunctionRemoved)(void*ctxt, BNBinaryView* view, BNComponent* component, BNFunction* function);
+ void (*componentDataVariableAdded)(void*ctxt, BNBinaryView* view, BNComponent* component, BNDataVariable* var);
+ void (*componentDataVariableRemoved)(void*ctxt, BNBinaryView* view, BNComponent* component, BNDataVariable* var);
};
struct BNFileAccessor
@@ -3786,7 +3788,6 @@ extern "C"
BINARYNINJACOREAPI uint64_t BNGetFunctionHighestAddress(BNFunction* func);
BINARYNINJACOREAPI uint64_t BNGetFunctionLowestAddress(BNFunction* func);
BINARYNINJACOREAPI BNAddressRange* BNGetFunctionAddressRanges(BNFunction* func, size_t* count);
- BINARYNINJACOREAPI BNComponent** BNGetFunctionParentComponents(BNFunction *func, size_t* count);
BINARYNINJACOREAPI BNLowLevelILFunction* BNGetFunctionLowLevelIL(BNFunction* func);
BINARYNINJACOREAPI BNLowLevelILFunction* BNGetFunctionLowLevelILIfAvailable(BNFunction* func);
@@ -5530,6 +5531,9 @@ extern "C"
BINARYNINJACOREAPI void BNRemoveExpressionParserMagicValues(BNBinaryView* view, const char** names, size_t count);
BINARYNINJACOREAPI bool BNGetExpressionParserMagicValue(BNBinaryView* view, const char* name, uint64_t* value);
+ BINARYNINJACOREAPI BNComponent** BNGetFunctionParentComponents(BNBinaryView* view, BNFunction *func, size_t* count);
+ BINARYNINJACOREAPI BNComponent** BNGetDataVariableParentComponents(BNBinaryView* view, uint64_t dataVariable, size_t* count);
+
// Source code processing
BINARYNINJACOREAPI bool BNPreprocessSource(const char* source, const char* fileName, char** output, char** errors,
const char** includeDirs, size_t includeDirCount);
@@ -6091,6 +6095,7 @@ extern "C"
BINARYNINJACOREAPI BNFunction** BNComponentGetContainedFunctions(BNComponent *component, size_t *count);
BINARYNINJACOREAPI BNComponent** BNComponentGetContainedComponents(BNComponent *component, size_t *count);
+ BINARYNINJACOREAPI BNDataVariable* BNComponentGetContainedDataVariables(BNComponent *component, size_t *count);
BINARYNINJACOREAPI BNDataVariable* BNComponentGetReferencedDataVariables(BNComponent *component, size_t *count);
BINARYNINJACOREAPI BNDataVariable* BNComponentGetReferencedDataVariablesRecursive(BNComponent *component, size_t *count);
@@ -6104,17 +6109,23 @@ extern "C"
BINARYNINJACOREAPI bool BNComponentContainsFunction(BNComponent* component, BNFunction *function);
BINARYNINJACOREAPI bool BNComponentContainsComponent(BNComponent *parent, BNComponent *component);
+ BINARYNINJACOREAPI bool BNComponentContainsDataVariable(BNComponent* component, uint64_t address);
+
BINARYNINJACOREAPI bool BNComponentAddFunctionReference(BNComponent* component, BNFunction* function);
BINARYNINJACOREAPI bool BNComponentAddComponent(BNComponent* parent, BNComponent* component);
+ BINARYNINJACOREAPI bool BNComponentAddDataVariable(BNComponent* component, uint64_t address);
+
BINARYNINJACOREAPI bool BNComponentRemoveComponent(BNComponent* component);
- BINARYNINJACOREAPI void BNComponentAddAllMembersFromComponent(BNComponent *component, BNComponent *fromComponent);
- BINARYNINJACOREAPI bool BNComponentRemoveFunctionReference(BNComponent *component, BNFunction *function);
- BINARYNINJACOREAPI void BNComponentRemoveAllFunctions(BNComponent *component);
- BINARYNINJACOREAPI char *BNComponentGetGuid(BNComponent *component);
+ BINARYNINJACOREAPI bool BNComponentRemoveFunctionReference(BNComponent* component, BNFunction* function);
+ BINARYNINJACOREAPI void BNComponentRemoveAllFunctions(BNComponent* component);
+ BINARYNINJACOREAPI bool BNComponentRemoveDataVariable(BNComponent* component, uint64_t address);
+
+ BINARYNINJACOREAPI void BNComponentAddAllMembersFromComponent(BNComponent* component, BNComponent* fromComponent);
+ BINARYNINJACOREAPI char* BNComponentGetGuid(BNComponent* component);
BINARYNINJACOREAPI bool BNComponentsEqual(BNComponent* a, BNComponent* b);
BINARYNINJACOREAPI bool BNComponentsNotEqual(BNComponent* a, BNComponent* b);
- BINARYNINJACOREAPI char *BNComponentGetDisplayName(BNComponent* component);
- BINARYNINJACOREAPI char *BNComponentGetOriginalName(BNComponent* component);
+ BINARYNINJACOREAPI char* BNComponentGetDisplayName(BNComponent* component);
+ BINARYNINJACOREAPI char* BNComponentGetOriginalName(BNComponent* component);
BINARYNINJACOREAPI void BNComponentSetName(BNComponent* component, const char* name);
BINARYNINJACOREAPI BNBinaryView* BNComponentGetView(BNComponent* component);