From 6894a946b1fa5ad24e64d24bb7f606bae14c300a Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 11 Jul 2025 17:55:04 -0400 Subject: Add API to get all type references at the same time to avoid duplicating work --- binaryninjacore.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'binaryninjacore.h') diff --git a/binaryninjacore.h b/binaryninjacore.h index b4c29816..fbdcf4f5 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -3732,6 +3732,16 @@ extern "C" bool higherToLowerDirect; } BNExprMapInfo; + typedef struct BNAllTypeReferences + { + BNReferenceSource* codeRefs; + size_t codeRefCount; + uint64_t* dataRefs; + size_t dataRefCount; + BNTypeReferenceSource* typeRefs; + size_t typeRefCount; + } BNAllTypeReferences; + typedef struct BNAllTypeFieldReferences { BNTypeFieldReference* codeRefs; @@ -5055,6 +5065,8 @@ extern "C" BINARYNINJACOREAPI BNTypeReferenceSource* BNGetTypeReferencesForTypeField( BNBinaryView* view, BNQualifiedName* type, uint64_t offset, size_t* count); + BINARYNINJACOREAPI BNAllTypeReferences BNGetAllReferencesForType(BNBinaryView* view, BNQualifiedName* type); + BINARYNINJACOREAPI void BNFreeAllTypeReferences(BNAllTypeReferences* refs); BINARYNINJACOREAPI BNAllTypeFieldReferences BNGetAllReferencesForTypeField( BNBinaryView* view, BNQualifiedName* type, uint64_t offset); BINARYNINJACOREAPI void BNFreeAllTypeFieldReferences(BNAllTypeFieldReferences* refs); -- cgit v1.3.1