summaryrefslogtreecommitdiff
path: root/binaryninjacore.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2022-06-09 17:36:44 -0400
committerGlenn Smith <glenn@vector35.com>2022-11-11 16:11:47 -0500
commit14d91ab76f7bcee588bcbb7e89639adae90c9f62 (patch)
tree35715e66dc58015c421f4ada9e76dbf079213594 /binaryninjacore.h
parent772ab3ced92833a271db5ba05cdcfbf83b9f1880 (diff)
Extra options for type parsers
Diffstat (limited to 'binaryninjacore.h')
-rw-r--r--binaryninjacore.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h
index cb9a83c4..f45fa675 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -36,14 +36,14 @@
// Current ABI version for linking to the core. This is incremented any time
// there are changes to the API that affect linking, including new functions,
// new types, or modifications to existing functions or types.
-#define BN_CURRENT_CORE_ABI_VERSION 27
+#define BN_CURRENT_CORE_ABI_VERSION 28
// Minimum ABI version that is supported for loading of plugins. Plugins that
// are linked to an ABI version less than this will not be able to load and
// will require rebuilding. The minimum version is increased when there are
// incompatible changes that break binary compatibility, such as changes to
// existing types or functions.
-#define BN_MINIMUM_CORE_ABI_VERSION 24
+#define BN_MINIMUM_CORE_ABI_VERSION 28
#ifdef __GNUC__
#ifdef BINARYNINJACORE_LIBRARY
@@ -2104,6 +2104,12 @@ extern "C"
BNLowLevelILFunction* il, BNRelocation* relocation);
};
+ enum BNTypeParserOption
+ {
+ IncludeSystemTypes,
+ BuiltinMacros,
+ };
+
struct BNParsedType
{
BNQualifiedName name;
@@ -2515,6 +2521,7 @@ extern "C"
struct BNTypeParserCallbacks
{
void* context;
+ bool (*getOptionText)(void* ctxt, BNTypeParserOption option, const char* value, char** result);
bool (*preprocessSource)(void* ctxt,
const char* source, const char* fileName, BNPlatform* platform,
const BNQualifiedNameTypeAndId* existingTypes, size_t existingTypeCount,
@@ -5484,6 +5491,8 @@ extern "C"
BINARYNINJACOREAPI char* BNGetTypeParserName(BNTypeParser* parser);
+ BINARYNINJACOREAPI bool BNGetTypeParserOptionText(BNTypeParser* parser, BNTypeParserOption option,
+ const char* value, char** result);
BINARYNINJACOREAPI bool BNTypeParserPreprocessSource(BNTypeParser* parser,
const char* source, const char* fileName, BNPlatform* platform,
const BNQualifiedNameTypeAndId* existingTypes, size_t existingTypeCount,