From c35849163319ee606a28eb4d8bfd585b1f4eddcf Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 21 Sep 2025 21:51:37 -0400 Subject: Support bitfields in type system Also adds support for parsing bitfields in PDB, DWARF and SVD plugins WIP: API needs to be considered more, also need to find type related apis that may need to be rethought. --- binaryninjacore.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'binaryninjacore.h') diff --git a/binaryninjacore.h b/binaryninjacore.h index dd03910b..a5e2605b 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -2519,6 +2519,8 @@ extern "C" uint8_t typeConfidence; BNMemberAccess access; BNMemberScope scope; + uint8_t bitPosition; + uint8_t bitWidth; } BNStructureMember; typedef struct BNInheritedStructureMember @@ -7069,7 +7071,7 @@ extern "C" const char* name, BNMemberAccess access, BNMemberScope scope); BINARYNINJACOREAPI void BNAddStructureBuilderMemberAtOffset(BNStructureBuilder* s, const BNTypeWithConfidence* const type, const char* name, uint64_t offset, bool overwriteExisting, - BNMemberAccess access, BNMemberScope scope); + BNMemberAccess access, BNMemberScope scope, uint8_t bitPosition, uint8_t bitWidth); BINARYNINJACOREAPI void BNRemoveStructureBuilderMember(BNStructureBuilder* s, size_t idx); BINARYNINJACOREAPI void BNReplaceStructureBuilderMember(BNStructureBuilder* s, size_t idx, const BNTypeWithConfidence* const type, const char* name, bool overwriteExisting); -- cgit v1.3.1