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 --- binaryninjaapi.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'binaryninjaapi.h') diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 9200b3c1..2f255cb9 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -4274,13 +4274,27 @@ namespace BinaryNinja { */ uint64_t GetNextValidOffset(uint64_t offset) const; + /*! GetOriginalBase queries for the original image base in the BinaryView, unaffected by any rebasing operations + + \return the original image base of the BinaryView + */ + uint64_t GetOriginalBase() const; + + /*! SetOriginalBase sets the original image base in the BinaryView, unaffected by any rebasing operations. + * This is only intended to be used by Binary View implementations to provide this value. Regular users should + * NOT change this value. + + \param base the original image base of the binary view + */ + void SetOriginalBase(uint64_t base); + /*! GetStart queries for the first valid virtual address in the BinaryView \return the start of the BinaryView */ uint64_t GetStart() const; - /*! GetEnd queries for the first valid virtual address in the BinaryView + /*! GetEnd queries for the end virtual address of the BinaryView \return the end of the BinaryView */ -- cgit v1.3.1