diff options
| author | Ryan Snyder <ryan@vector35.com> | 2019-09-11 21:03:56 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2019-09-24 10:42:12 -0400 |
| commit | c5bd94376017e9d9d98a4dba2fac6b49572cda6d (patch) | |
| tree | f81ed6dad33b591013cffcf63866627a02f468bb /python/architecture.py | |
| parent | ae51b060402a939afcae5b52e30cfebd4944a26e (diff) | |
typelibrary: minimal api commit
Diffstat (limited to 'python/architecture.py')
| -rw-r--r-- | python/architecture.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/architecture.py b/python/architecture.py index 5fe2aec9..296bdab9 100644 --- a/python/architecture.py +++ b/python/architecture.py @@ -31,6 +31,7 @@ import binaryninja from binaryninja import log from binaryninja import lowlevelil from binaryninja import types +from binaryninja import typelibrary from binaryninja import databuffer from binaryninja import platform from binaryninja import callingconvention @@ -430,6 +431,18 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)): pl = core.BNGetArchitectureStandalonePlatform(self.handle) return platform.Platform(self, pl) + @property + def type_libraries(self): + """Architecture type libraries""" + count = ctypes.c_ulonglong(0) + result = [] + handles = core.BNGetArchitectureTypeLibraries(self.handle, count) + for i in range(0, count.value): + result.append(typelibrary.TypeLibrary(core.BNNewTypeLibraryReference(handles[i]))) + core.BNFreeTypeLibraryList(handles, count.value) + return result + + def __setattr__(self, name, value): if ((name == "name") or (name == "endianness") or (name == "address_size") or (name == "default_int_size") or (name == "regs") or (name == "get_max_instruction_length") or |
