美文网首页
lldb script

lldb script

作者: 偶是星爷 | 来源:发表于2017-05-14 23:47 被阅读34次
(lldb) command script add test
Enter your Python command(s). Type 'DONE' to end.
You must define a Python function with this signature:
def my_command_impl(debugger, args, result, internal_dict):
    ReturnObject = lldb.SBCommandReturnObject()
    while True:
        debugger.GetCommandInterpreter().HandleCommand('p *(char*)($rbp-0x331)', ReturnObject)
        ret = ReturnObject.GetOutput()
        print(ret);
        if ret.find("ff") > 0:
            debugger.HandleCommand('dis')
            break
        debugger.GetCommandInterpreter().HandleCommand('ni', ReturnObject)

相关文章

网友评论

      本文标题:lldb script

      本文链接:https://www.haomeiwen.com/subject/hrecxxtx.html