lldbinit.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:MacHeap 作者: blankwall 项目源码 文件源码
def __add_command(cls, key):
        path = (cls.__module__, cls.__name__, cls.frontend.__class__.__name__)
        t = cls.__type(cls.cache[key])
        if t == types.FunctionType:
            scr = functools.partial("command script add -f {:s}.{:s} {:s}".format, '.'.join(path), key)
        elif t == types.ObjectType and key in cls.__synchronicity__:
            scr = functools.partial("command script add -c {:s}.{:s} -s {:s} {:s}".format, '.'.join(path), key, cls.__synchronicity__[key])
        elif t == types.ObjectType and key not in cls.__synchronicity__:
            scr = functools.partial("command script add -c {:s}.{:s} {:s}".format, '.'.join(path), key)
        else:
            raise TypeError('{:s}.{:s} : Unable to generate command with unknown type. {!r}'.format(cls.__module__, cls.__name__, t))
        return scr
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号