summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/types.py b/python/types.py
index 8880d152..b3403f6d 100644
--- a/python/types.py
+++ b/python/types.py
@@ -255,6 +255,20 @@ class Symbol(object):
def auto(self):
return core.BNIsSymbolAutoDefined(self.handle)
+ @property
+ def aliases(self):
+ """
+ List of aliases tied to this symbol.
+ Aliases are the names of any other symbols that also happen to be at the same address.
+ """
+ result = []
+ count = ctypes.c_ulonglong(0)
+ aliases = core.BNGetSymbolAliases(self.handle, count)
+ for i in range(count.value):
+ result.append(aliases[i])
+ core.BNFreeStringList(aliases, count)
+ return result
+
def __repr__(self):
return "<%s: \"%s\" @ %#x>" % (self.type, self.full_name, self.address)