diff options
| author | Rusty Wagner <rusty.wagner@gmail.com> | 2023-03-16 19:54:07 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty.wagner@gmail.com> | 2023-03-30 18:05:12 -0400 |
| commit | d811fffd69ffba789b960edd4fa31cc3d3f5905e (patch) | |
| tree | 09d036bc3cedc4b93f9fc45b77ebf86659ee0aec /binaryview.cpp | |
| parent | 1113603311856740654617341767562218182618 (diff) | |
Add support for deriving structures from other structures
Diffstat (limited to 'binaryview.cpp')
| -rw-r--r-- | binaryview.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/binaryview.cpp b/binaryview.cpp index 67fe011c..be4c4ca7 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -2199,6 +2199,19 @@ vector<uint64_t> BinaryView::GetDataReferencesForTypeField(const QualifiedName& } +vector<uint64_t> BinaryView::GetDataReferencesFromForTypeField(const QualifiedName& type, uint64_t offset) +{ + size_t count; + BNQualifiedName nameObj = type.GetAPIObject(); + uint64_t* refs = BNGetDataReferencesFromForTypeField(m_object, &nameObj, offset, &count); + QualifiedName::FreeAPIObject(&nameObj); + + vector<uint64_t> result(refs, &refs[count]); + BNFreeDataReferences(refs); + return result; +} + + vector<TypeReferenceSource> BinaryView::GetTypeReferencesForTypeField(const QualifiedName& type, uint64_t offset) { size_t count; |
