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 --- binaryninjaapi.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 85dedca7..8d3fed9c 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -4554,6 +4554,13 @@ namespace BinaryNinja { BNRegisterValue ToAPIObject(); }; + struct AllTypeReferences + { + std::vector codeRefs; + std::vector dataRefs; + std::vector typeRefs; + }; + struct AllTypeFieldReferences { std::vector codeRefs; @@ -5654,6 +5661,13 @@ namespace BinaryNinja { */ std::vector GetTypeReferencesForTypeField(const QualifiedName& type, uint64_t offset); + /*! Returns a all references to a specific type. This includes code, data, and type references. + + \param type QualifiedName of the type + \return AllTypeReferences structure with all references + */ + AllTypeReferences GetAllReferencesForType(const QualifiedName& type); + /*! Returns a all references to a specific type field. This includes code, data, and type references. \param type QualifiedName of the type -- cgit v1.3.1