diff options
| author | Rusty Wagner <rusty@vector35.com> | 2016-09-19 22:26:56 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2016-09-19 22:27:49 -0400 |
| commit | 1364a9bc7b3887441540cd27685c1addb028afb3 (patch) | |
| tree | 619a46a156811837165126d3ccf6f20707a74b71 /binaryninjacore.h | |
| parent | f91afbf10a7d51b8166c16a371e1ba2a7de890b9 (diff) | |
Adding APIs to store arbitrary data on a per-view, per-file, or per-function basis
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 34806b6c..084fd34d 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -1070,6 +1070,17 @@ extern "C" bool (*getDirectoryNameInput)(void* ctxt, char** result, const char* prompt, const char* defaultName); }; + struct BNObjectDestructionCallbacks + { + void* context; + // The provided pointers have a reference count of zero. Do not add additional references, doing so + // can lead to a double free. These are provided only for freeing additional state related to the + // objects passed. + void (*destructBinaryView)(void* ctxt, BNBinaryView* view); + void (*destructFileMetadata)(void* ctxt, BNFileMetadata* file); + void (*destructFunction)(void* ctxt, BNFunction* func); + }; + BINARYNINJACOREAPI char* BNAllocString(const char* contents); BINARYNINJACOREAPI void BNFreeString(char* str); @@ -1080,6 +1091,9 @@ extern "C" BINARYNINJACOREAPI bool BNIsLicenseValidated(void); + BINARYNINJACOREAPI void BNRegisterObjectDestructionCallbacks(BNObjectDestructionCallbacks* callbacks); + BINARYNINJACOREAPI void BNUnregisterObjectDestructionCallbacks(BNObjectDestructionCallbacks* callbacks); + // Plugin initialization BINARYNINJACOREAPI void BNInitCorePlugins(void); BINARYNINJACOREAPI void BNInitUserPlugins(void); |
