summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h5
-rw-r--r--binaryninjacore.h8
-rw-r--r--binaryview.cpp24
-rw-r--r--python/binaryview.py5
4 files changed, 5 insertions, 37 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 59c79631..bf1421fd 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -4219,11 +4219,6 @@ namespace BinaryNinja {
uint64_t GetDataLength() const;
uint32_t GetFlags() const;
bool IsAutoDefined() const;
-
- void SetLength(uint64_t length);
- void SetDataOffset(uint64_t dataOffset);
- void SetDataLength(uint64_t dataLength);
- void SetFlags(uint32_t flags);
};
/*! The Section object is returned during BinaryView creation and should not be directly instantiated.
diff --git a/binaryninjacore.h b/binaryninjacore.h
index a17c9c24..45ef79f2 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 71
+#define BN_CURRENT_CORE_ABI_VERSION 72
// 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 71
+#define BN_MINIMUM_CORE_ABI_VERSION 72
#ifdef __GNUC__
#ifdef BINARYNINJACORE_LIBRARY
@@ -7014,10 +7014,6 @@ extern "C"
BINARYNINJACOREAPI uint64_t BNSegmentGetDataLength(BNSegment* segment);
BINARYNINJACOREAPI uint32_t BNSegmentGetFlags(BNSegment* segment);
BINARYNINJACOREAPI bool BNSegmentIsAutoDefined(BNSegment* segment);
- BINARYNINJACOREAPI void BNSegmentSetLength(BNSegment* segment, uint64_t length);
- BINARYNINJACOREAPI void BNSegmentSetDataOffset(BNSegment* segment, uint64_t dataOffset);
- BINARYNINJACOREAPI void BNSegmentSetDataLength(BNSegment* segment, uint64_t dataLength);
- BINARYNINJACOREAPI void BNSegmentSetFlags(BNSegment* segment, uint32_t flags);
// Section object methods
BINARYNINJACOREAPI BNSection* BNNewSectionReference(BNSection* section);
diff --git a/binaryview.cpp b/binaryview.cpp
index 01ab7b95..3eea7241 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -1087,30 +1087,6 @@ bool Segment::IsAutoDefined() const
}
-void Segment::SetLength(uint64_t length)
-{
- BNSegmentSetLength(m_object, length);
-}
-
-
-void Segment::SetDataOffset(uint64_t dataOffset)
-{
- BNSegmentSetDataOffset(m_object, dataOffset);
-}
-
-
-void Segment::SetDataLength(uint64_t dataLength)
-{
- BNSegmentSetDataLength(m_object, dataLength);
-}
-
-
-void Segment::SetFlags(uint32_t flags)
-{
- BNSegmentSetFlags(m_object, flags);
-}
-
-
Section::Section(BNSection* sec)
{
m_object = sec;
diff --git a/python/binaryview.py b/python/binaryview.py
index 81202167..903c988f 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -2215,8 +2215,9 @@ class MemoryMap:
def get_active_memory_region_at(self, addr: int) -> str:
return core.BNGetActiveMemoryRegionAt(self.handle, addr)
- def get_memory_region_flags(self, name: str) -> SegmentFlag:
- return SegmentFlag(core.BNGetMemoryRegionFlags(self.handle, name))
+ def get_memory_region_flags(self, name: str) -> set:
+ flags = core.BNGetMemoryRegionFlags(self.handle, name)
+ return {flag for flag in SegmentFlag if flags & flag}
def set_memory_region_flags(self, name: str, flags: SegmentFlag) -> bool:
return core.BNSetMemoryRegionFlags(self.handle, name, flags)