def __init__(self, arch, handle=None): if handle is None: self.arch = arch self.handle = core.BNCreatePlatform(arch.handle, self.__class__.name) else: self.handle = handle self.__dict__["name"] = core.BNGetPlatformName(self.handle) self.arch = binaryninja.architecture.CoreArchitecture._from_cache( core.BNGetPlatformArchitecture(self.handle))
def __init__(self, arch = None, handle = None): if handle is None: if arch is None: self.handle = None raise ValueError("platform must have an associated architecture") self._arch = arch self.handle = core.BNCreatePlatform(arch.handle, self.__class__.name) else: self.handle = handle self.__dict__["name"] = core.BNGetPlatformName(self.handle) self._arch = binaryninja.architecture.CoreArchitecture._from_cache(core.BNGetPlatformArchitecture(self.handle))