summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2016-11-07 19:59:38 -0500
committerJordan Wiens <jordan@psifertex.com>2016-11-07 19:59:38 -0500
commitfdad629b8e9d859607d70d2712eee1684fd31614 (patch)
tree6eaacc547f797b43c5fc092e4c25f94af14f2d8d /python
parenteef9d1eff05975c31862db4157ac2f1b2bb30502 (diff)
updated documentation for get_code_refs
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/python/__init__.py b/python/__init__.py
index 1751fefa..a855d991 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -2490,6 +2490,19 @@ class BinaryView(object):
return BasicBlock(self, block)
def get_code_refs(self, addr, length = None):
+ """
+ ``get_code_refs`` returns a list of ReferenceSource objects (xrefs or cross-references) that point to the provided virtual address.
+
+ :param int addr: virtual address to query for references
+ :return: List of References for the given virtual address
+ :rtype: list(ReferenceSource)
+ :Example:
+
+ >>> bv.get_code_refs(here)
+ [<ref: x86@0x4165ff>]
+ >>>
+
+ """
count = ctypes.c_ulonglong(0)
if length is None:
refs = core.BNGetCodeReferences(self.handle, addr, count)