From 4431ddb07ac63b5cd8da5ff4050e335b5ab4d0ba Mon Sep 17 00:00:00 2001 From: Xusheng Date: Thu, 3 Aug 2023 10:49:32 +0800 Subject: Add an API to get structure member including inherited ones. Fix auto structure creation overwrites inherited fields. Close https://github.com/Vector35/binaryninja-api/issues/4540 --- binaryninjaapi.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index e14e12b4..62177289 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -8136,6 +8136,16 @@ namespace BinaryNinja { */ std::vector GetMembersIncludingInherited(BinaryView* view) const; + /*! Get a structure member (including inherited members) at a certain offset + + \param view The relevant binary view + \param offset Offset to check + \param result Reference to a InheritedStructureMember to copy the result to + \return Whether a member was found + */ + bool GetMemberIncludingInheritedAtOffset(BinaryView* view, int64_t offset, + InheritedStructureMember& result) const; + /*! Get a structure member by name \param name Name of the member to retrieve -- cgit v1.3.1