diff options
Diffstat (limited to 'python/types.py')
| -rw-r--r-- | python/types.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/types.py b/python/types.py index f1c032b3..70a9d6cc 100644 --- a/python/types.py +++ b/python/types.py @@ -154,7 +154,7 @@ class Symbol(object): ExternalSymbol Symbols for data and code that reside outside the BinaryView =========================== ============================================================== """ - def __init__(self, sym_type, addr, short_name, full_name=None, raw_name=None, handle=None, binding=None, namespace=None): + def __init__(self, sym_type, addr, short_name, full_name=None, raw_name=None, handle=None, binding=None, namespace=None, ordinal=0): if handle is not None: self.handle = core.handle_of_type(handle, core.BNSymbol) else: @@ -170,7 +170,7 @@ class Symbol(object): namespace = NameSpace(namespace) if isinstance(namespace, NameSpace): namespace = namespace._get_core_struct() - self.handle = core.BNCreateSymbol(sym_type, short_name, full_name, raw_name, addr, binding, namespace) + self.handle = core.BNCreateSymbol(sym_type, short_name, full_name, raw_name, addr, binding, namespace, ordinal) def __del__(self): core.BNFreeSymbol(self.handle) @@ -229,6 +229,11 @@ class Symbol(object): return core.BNGetSymbolAddress(self.handle) @property + def ordinal(self): + """Symbol ordinal (read-only)""" + return core.BNGetSymbolOrdinal(self.handle) + + @property def auto(self): return core.BNIsSymbolAutoDefined(self.handle) |
