diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2025-07-02 18:53:31 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2025-07-03 12:44:56 -0400 |
| commit | 2cd19b867772f15d87eaee9560b94a9fd9ba13e4 (patch) | |
| tree | 00fc16b815a0c1176e96b388e9c11cb7621391a8 /binaryninjaapi.h | |
| parent | b4918a512bef271d7f6e27980ea875208c7f2954 (diff) | |
Add API to get all type field references at the same time to avoid duplicating work
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index edac64b8..66f40fac 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -4546,6 +4546,14 @@ namespace BinaryNinja { BNRegisterValue ToAPIObject(); }; + struct AllTypeFieldReferences + { + std::vector<TypeFieldReference> codeRefs; + std::vector<uint64_t> dataRefsTo; + std::vector<uint64_t> dataRefsFrom; + std::vector<TypeReferenceSource> typeRefs; + }; + struct QualifiedNameAndType; struct PossibleValueSet; class Metadata; @@ -5638,13 +5646,21 @@ namespace BinaryNinja { */ std::vector<TypeReferenceSource> GetTypeReferencesForTypeField(const QualifiedName& type, uint64_t offset); + /*! Returns a all references to a specific type field. This includes code, data, and type references. + + \param type QualifiedName of the type + \param offset Offset of the field, relative to the start of the type + \return AllTypeFieldReferences structure with all references + */ + AllTypeFieldReferences GetAllReferencesForTypeField(const QualifiedName& type, uint64_t offset); + /*! Returns a list of types referenced by code at ReferenceSource \c src - If no function is specified, references from all functions and containing the address will be returned. - If no architecture is specified, the architecture of the function will be used. + If no function is specified, references from all functions and containing the address will be returned. + If no architecture is specified, the architecture of the function will be used. - \param src Source of the reference to check - \return vector of TypeReferenceSources + \param src Source of the reference to check + \return vector of TypeReferenceSources */ std::vector<TypeReferenceSource> GetCodeReferencesForTypeFrom(ReferenceSource src); |
