summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2021-11-04 15:55:04 -0400
committerPeter LaFosse <peter@vector35.com>2021-11-04 15:55:04 -0400
commiteacbbc9a3f955b21ea50a1ae49747d4df6498670 (patch)
treed512df9825d7998db949776cdff759676eda41ae
parentd2915cca83ac3ff5f89b3bf7c21327afd2b5338a (diff)
Expose RangeContainsRelocation
-rw-r--r--binaryninjaapi.h1
-rw-r--r--binaryview.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index a2f5b122..ff157886 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -1723,6 +1723,7 @@ __attribute__ ((format (printf, 1, 2)))
void DefineRelocation(Architecture* arch, BNRelocationInfo& info, Ref<Symbol> target, uint64_t reloc);
std::vector<std::pair<uint64_t, uint64_t>> GetRelocationRanges() const;
std::vector<std::pair<uint64_t, uint64_t>> GetRelocationRangesAtAddress(uint64_t addr) const;
+ bool RangeContainsRelocation(uint64_t addr, size_t size) const;
void RegisterNotification(BinaryDataNotification* notify);
void UnregisterNotification(BinaryDataNotification* notify);
diff --git a/binaryview.cpp b/binaryview.cpp
index 749368dc..fb9b9340 100644
--- a/binaryview.cpp
+++ b/binaryview.cpp
@@ -1323,6 +1323,12 @@ vector<pair<uint64_t, uint64_t>> BinaryView::GetRelocationRangesAtAddress(uint64
}
+bool BinaryView::RangeContainsRelocation(uint64_t addr, size_t size) const
+{
+ return BNRangeContainsRelocation(m_object, addr, size);
+}
+
+
void BinaryView::RegisterNotification(BinaryDataNotification* notify)
{
BNRegisterDataNotification(m_object, notify->GetCallbacks());