diff options
| author | Brian Potchik <brian@vector35.com> | 2026-04-17 12:10:07 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2026-04-17 12:10:07 -0400 |
| commit | bfd306437f34ebc4d4170c5fb8170261585f6038 (patch) | |
| tree | 36dd320d130fa23239213dd94546abb9a5ab4114 /binaryninjacore.h | |
| parent | 424dc721f5f2a3a7ffd5a6ccbcc7320b5ae7496d (diff) | |
Add RecognizeConstantData to StringRecognizer API
Adds a new recognize_constant_data method to the StringRecognizer API,
enabling plugins to decode constant data expressions (HLIL_CONST_DATA)
recovered by the outline resolver. The recognizer receives the full
instruction, giving access to the data buffer and builtin type via the
constant_data accessor.
Also fixes a pre-existing ctypes mismatch in get_constant_data_and_builtin
where BNBuiltinType (uint8_t) was incorrectly passed as c_int.
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index 382bf1d2..a0b985ec 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -37,14 +37,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 165 +#define BN_CURRENT_CORE_ABI_VERSION 166 // 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 165 +#define BN_MINIMUM_CORE_ABI_VERSION 166 #ifdef __GNUC__ #ifdef BINARYNINJACORE_LIBRARY @@ -4022,6 +4022,8 @@ extern "C" uint64_t offset, BNDerivedString* result); bool (*recognizeImport)( void* ctxt, BNHighLevelILFunction* hlil, size_t expr, BNType* type, int64_t val, BNDerivedString* result); + bool (*recognizeConstantData)( + void* ctxt, BNHighLevelILFunction* hlil, size_t expr, BNDerivedString* result); } BNCustomStringRecognizer; typedef struct BNCustomStringTypeInfo @@ -9079,6 +9081,8 @@ extern "C" BNHighLevelILFunction* il, size_t exprIndex, BNType* type, int64_t val, uint64_t offset, BNDerivedString* out); BINARYNINJACOREAPI bool BNStringRecognizerRecognizeImport(BNStringRecognizer* recognizer, BNHighLevelILFunction* il, size_t exprIndex, BNType* type, int64_t val, BNDerivedString* out); + BINARYNINJACOREAPI bool BNStringRecognizerRecognizeConstantData(BNStringRecognizer* recognizer, + BNHighLevelILFunction* il, size_t exprIndex, BNDerivedString* out); // PossibleValueSet operations BINARYNINJACOREAPI void BNFreePossibleValueSet(BNPossibleValueSet* object); |
