From ab12527cffa04b04ac282d64b2eb30391808757a Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 5 Jan 2024 15:47:54 +0800 Subject: Add a new API to get the original image base of the binary view. Fix https://github.com/Vector35/binaryninja-api/issues/4861 --- binaryninjacore.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'binaryninjacore.h') diff --git a/binaryninjacore.h b/binaryninjacore.h index 1c790796..bc2301f4 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -37,14 +37,14 @@ // Current ABI version for linking to the core. This is incremented any time // there are changes to the API that affect linking, including new functions, // new types, or modifications to existing functions or types. -#define BN_CURRENT_CORE_ABI_VERSION 44 +#define BN_CURRENT_CORE_ABI_VERSION 45 // Minimum ABI version that is supported for loading of plugins. Plugins that // are linked to an ABI version less than this will not be able to load and // will require rebuilding. The minimum version is increased when there are // incompatible changes that break binary compatibility, such as changes to // existing types or functions. -#define BN_MINIMUM_CORE_ABI_VERSION 44 +#define BN_MINIMUM_CORE_ABI_VERSION 45 #ifdef __GNUC__ #ifdef BINARYNINJACORE_LIBRARY @@ -3409,6 +3409,8 @@ extern "C" BINARYNINJACOREAPI bool BNIsOffsetExternSemantics(BNBinaryView* view, uint64_t offset); BINARYNINJACOREAPI bool BNIsOffsetWritableSemantics(BNBinaryView* view, uint64_t offset); BINARYNINJACOREAPI uint64_t BNGetNextValidOffset(BNBinaryView* view, uint64_t offset); + BINARYNINJACOREAPI uint64_t BNGetOriginalBase(BNBinaryView* view); + BINARYNINJACOREAPI void BNSetOriginalBase(BNBinaryView* view, uint64_t base); BINARYNINJACOREAPI uint64_t BNGetStartOffset(BNBinaryView* view); BINARYNINJACOREAPI uint64_t BNGetEndOffset(BNBinaryView* view); BINARYNINJACOREAPI uint64_t BNGetViewLength(BNBinaryView* view); -- cgit v1.3.1