|
37 | 37 | // Current ABI version for linking to the core. This is incremented any time |
38 | 38 | // there are changes to the API that affect linking, including new functions, |
39 | 39 | // new types, or modifications to existing functions or types. |
40 | | -#define BN_CURRENT_CORE_ABI_VERSION 99 |
| 40 | +#define BN_CURRENT_CORE_ABI_VERSION 100 |
41 | 41 |
|
42 | 42 | // Minimum ABI version that is supported for loading of plugins. Plugins that |
43 | 43 | // are linked to an ABI version less than this will not be able to load and |
44 | 44 | // will require rebuilding. The minimum version is increased when there are |
45 | 45 | // incompatible changes that break binary compatibility, such as changes to |
46 | 46 | // existing types or functions. |
47 | | -#define BN_MINIMUM_CORE_ABI_VERSION 97 |
| 47 | +#define BN_MINIMUM_CORE_ABI_VERSION 100 |
48 | 48 |
|
49 | 49 | #ifdef __GNUC__ |
50 | 50 | #ifdef BINARYNINJACORE_LIBRARY |
@@ -230,6 +230,7 @@ extern "C" |
230 | 230 | typedef struct BNTypeBuilder BNTypeBuilder; |
231 | 231 | typedef struct BNTypeLibrary BNTypeLibrary; |
232 | 232 | typedef struct BNTypeLibraryMapping BNTypeLibraryMapping; |
| 233 | + typedef struct BNFieldResolutionInfo BNFieldResolutionInfo; |
233 | 234 | typedef struct BNStructure BNStructure; |
234 | 235 | typedef struct BNStructureBuilder BNStructureBuilder; |
235 | 236 | typedef struct BNTagType BNTagType; |
@@ -2627,6 +2628,13 @@ extern "C" |
2627 | 2628 | BNPossibleValueSet value; |
2628 | 2629 | } BNUserVariableValue; |
2629 | 2630 |
|
| 2631 | + typedef struct BNVariableFieldResolutionInfo |
| 2632 | + { |
| 2633 | + BNArchitectureAndAddress location; |
| 2634 | + BNVariable var; |
| 2635 | + BNFieldResolutionInfo* info; |
| 2636 | + } BNVariableFieldResolutionInfo; |
| 2637 | + |
2630 | 2638 | typedef enum BNFunctionUpdateType |
2631 | 2639 | { |
2632 | 2640 | UserFunctionUpdate, |
@@ -5422,6 +5430,15 @@ extern "C" |
5422 | 5430 | BINARYNINJACOREAPI void BNCreateForcedVariableVersion(BNFunction* func, const BNVariable* var, const BNArchitectureAndAddress* defSite); |
5423 | 5431 | BINARYNINJACOREAPI void BNClearForcedVariableVersion(BNFunction* func, const BNVariable* var, const BNArchitectureAndAddress* defSite); |
5424 | 5432 |
|
| 5433 | + BINARYNINJACOREAPI void BNSetFieldResolutionForVariableAt(BNFunction* func, const BNVariable* var, |
| 5434 | + const BNArchitectureAndAddress* defSite, const BNFieldResolutionInfo* info); |
| 5435 | + BINARYNINJACOREAPI BNFieldResolutionInfo* BNGetFieldResolutionForVariableAt(BNFunction* func, const BNVariable* var, |
| 5436 | + const BNArchitectureAndAddress* defSite); |
| 5437 | + BINARYNINJACOREAPI BNVariableFieldResolutionInfo* BNGetAllVariableFieldResolutions(BNFunction* func, size_t* count); |
| 5438 | + BINARYNINJACOREAPI void BNFreeVariableFieldResolutions(BNVariableFieldResolutionInfo* result, size_t count); |
| 5439 | + BINARYNINJACOREAPI void BNClearFieldResolutionForVariableAt(BNFunction* func, const BNVariable* var, |
| 5440 | + const BNArchitectureAndAddress* defSite); |
| 5441 | + |
5425 | 5442 | BINARYNINJACOREAPI void BNRequestFunctionDebugReport(BNFunction* func, const char* name); |
5426 | 5443 |
|
5427 | 5444 | BINARYNINJACOREAPI BNILReferenceSource* BNGetMediumLevelILVariableReferences( |
@@ -6290,6 +6307,9 @@ extern "C" |
6290 | 6307 | BINARYNINJACOREAPI char* BNGetLanguageRepresentationFunctionAnnotationEndString( |
6291 | 6308 | BNLanguageRepresentationFunction* func); |
6292 | 6309 |
|
| 6310 | + BINARYNINJACOREAPI BNFieldResolutionInfo* BNNewFieldResolutionInfoReference(BNFieldResolutionInfo* info); |
| 6311 | + BINARYNINJACOREAPI void BNFreeFieldResolutionInfo(BNFieldResolutionInfo* info); |
| 6312 | + |
6293 | 6313 | // Types |
6294 | 6314 | BINARYNINJACOREAPI bool BNTypesEqual(BNType* a, BNType* b); |
6295 | 6315 | BINARYNINJACOREAPI bool BNTypesNotEqual(BNType* a, BNType* b); |
@@ -6410,10 +6430,13 @@ extern "C" |
6410 | 6430 | BNType* type, BNNamedTypeReference* from, BNNamedTypeReference* to); |
6411 | 6431 |
|
6412 | 6432 | BINARYNINJACOREAPI bool BNAddTypeMemberTokens(BNType* type, BNBinaryView* data, BNInstructionTextToken** tokens, |
6413 | | - size_t* tokenCount, int64_t offset, char*** nameList, size_t* nameCount, size_t size, bool indirect); |
| 6433 | + size_t* tokenCount, int64_t offset, char*** nameList, size_t* nameCount, size_t size, bool indirect, BNFieldResolutionInfo* info); |
6414 | 6434 | BINARYNINJACOREAPI BNTypeDefinitionLine* BNGetTypeLines(BNType* type, BNTypeContainer* types, const char* name, int paddingCols, bool collapsed, BNTokenEscapingType escaping, size_t* count); |
6415 | 6435 | BINARYNINJACOREAPI void BNFreeTypeDefinitionLineList(BNTypeDefinitionLine* list, size_t count); |
6416 | 6436 |
|
| 6437 | + BINARYNINJACOREAPI bool BNEnumerateTypesForAccess(BNType* type, BNBinaryView* data, uint64_t offset, size_t size, uint8_t baseConfidence, |
| 6438 | + void (*terminal)(void*, BNTypeWithConfidence*, BNFieldResolutionInfo*), void* ctxt); |
| 6439 | + |
6417 | 6440 | BINARYNINJACOREAPI BNQualifiedName BNTypeBuilderGetTypeName(BNTypeBuilder* nt); |
6418 | 6441 | BINARYNINJACOREAPI void BNTypeBuilderSetTypeName(BNTypeBuilder* type, BNQualifiedName* name); |
6419 | 6442 | BINARYNINJACOREAPI void BNTypeBuilderSetAlternateName(BNTypeBuilder* type, const char* name); |
|
0 commit comments