From d811fffd69ffba789b960edd4fa31cc3d3f5905e Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Thu, 16 Mar 2023 19:54:07 -0400 Subject: Add support for deriving structures from other structures --- binaryview.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'binaryview.cpp') diff --git a/binaryview.cpp b/binaryview.cpp index 67fe011c..be4c4ca7 100644 --- a/binaryview.cpp +++ b/binaryview.cpp @@ -2199,6 +2199,19 @@ vector BinaryView::GetDataReferencesForTypeField(const QualifiedName& } +vector 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 result(refs, &refs[count]); + BNFreeDataReferences(refs); + return result; +} + + vector BinaryView::GetTypeReferencesForTypeField(const QualifiedName& type, uint64_t offset) { size_t count; -- cgit v1.3.1