summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2020-10-09 20:57:42 +0000
committerKyleMiles <krm504@nyu.edu>2020-10-19 18:17:44 +0000
commitc7ccd714ceeaabbe5ee682e361250c3cfd54f78f (patch)
treee9f9a6da19ca097f82b4a8f8c00ebba4ea14a590 /binaryninjacore.h
parent3083903d0ee4ccd18099cb3315e0220c7f5993fb (diff)
Expose Template Simplifier to the API, Adds Tests, and Adds Rust String FFI support to Python (see note)
This introduces the ability to receive and free string from Rust in Python. For it to work, your exposed function name needs to begin with "BNRust", and the generator will create the appropriate code for freeing string return values and arguments.
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index b13f9fb3..a34d1f7e 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -4464,6 +4464,8 @@ __attribute__ ((format (printf, 1, 2)))
//Demangler
BINARYNINJACOREAPI bool BNDemangleMS(BNArchitecture* arch, const char* mangledName, BNType** outType, char*** outVarName,
+ size_t* outVarNameElements, const bool simplify);
+ BINARYNINJACOREAPI bool BNDemangleMSWithOptions(BNArchitecture* arch, const char* mangledName, BNType** outType, char*** outVarName,
size_t* outVarNameElements, const BNBinaryView* const view);
// Download providers
@@ -4607,6 +4609,8 @@ __attribute__ ((format (printf, 1, 2)))
BINARYNINJACOREAPI bool BNIsGNU3MangledString(const char* mangledName);
BINARYNINJACOREAPI bool BNDemangleGNU3(BNArchitecture* arch, const char* mangledName, BNType** outType,
+ char*** outVarName, size_t* outVarNameElements, const bool simplify);
+ BINARYNINJACOREAPI bool BNDemangleGNU3WithOptions(BNArchitecture* arch, const char* mangledName, BNType** outType,
char*** outVarName, size_t* outVarNameElements, const BNBinaryView* const view);
BINARYNINJACOREAPI void BNFreeDemangledName(char*** name, size_t nameElements);
@@ -4872,6 +4876,11 @@ __attribute__ ((format (printf, 1, 2)))
BINARYNINJACOREAPI uint32_t BNGetAddressRenderedWidth(uint64_t addr);
+ BINARYNINJACOREAPI void BNRustFreeString(const char* const);
+ BINARYNINJACOREAPI void BNRustFreeStringArray(const char** const, uint64_t);
+ BINARYNINJACOREAPI const char** const BNRustSimplifyStrToFQN(const char* const, bool);
+ BINARYNINJACOREAPI const char* const BNRustSimplifyStrToStr(const char* const);
+
#ifdef __cplusplus
}
#endif