summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index fe7a9dc9..958318f7 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -2476,6 +2476,20 @@ class BinaryView(object):
core.BNFreeCodeReferences(refs, count.value)
return result
+ def get_data_refs(self, addr, length=None):
+ count = ctypes.c_ulonglong(0)
+ if length is None:
+ refs = core.BNGetDataReferences(self.handle, addr, count)
+ else:
+ refs = core.BNGetDataReferencesInRange(self.handle, addr, length, count)
+
+ result = []
+ for i in range(0, count.value):
+ result.append(refs[i])
+ core.BNFreeDataReferences(refs, count.value)
+ return result
+
+
def get_symbol_at(self, addr, namespace=None):
"""
``get_symbol_at`` returns the Symbol at the provided virtual address.