• debugserver + lldb代替gdb进行动态调试


    一、定制lldb(将下述所需的文件全部放于同一个文件夹下【假设为abc】,便于操作)
        1.
    下载一个能用的ldid(http://joedj.net/ldid)   做后面的签名之用
        2. 获取原生
    debugserver(建议直接从手机目录中拷贝出来,/Developer/usr/bin/debugserver,当此手机在Xcode中标记为开发设备后便会出来这些目录
        3.瘦身debugserver
         
    命令行cd到abc文件下
          输入
    lipo -thin armv7s /abc/fat/debugserver(原路径) -output /abc/thin/debugserver(重新生成的新路径)
               以上根据自己手机支持的armv7、armv7s、arm64提取,我这边以iphone5为例,是armv7
        4.签名瘦身之后的debugserver
         
    将下面的内容另存为一个名为ent.xml的文件
          


            com.apple.springboard.debugapplications
           
            get-task-allow
           
            task_for_pid-allow
           
            run-unsigned-code
           


           命令行中输入:abc$ ldid -Sent.xml thin/debugserver
         5.
    将定制好的debugserver拷贝回iOS,放在/usr/bin/debugserver下,然后在iOS的命令行运行:chmod +x /usr/bin/debugserver
         6.假如是IOS7下还要另外再加签名:
           
    http://www.iphonedevwiki.net/index.php/Debugging_on_iOS_7
           
    http://www.iphonedevwiki.net/index.php/Debugserver (里面的2、3点)
                   http://lldb.llvm.org/lldb-gdb.html


    参考:http://bbs.iosre.com/forum.php?mod=viewthread&tid=52&extra=page=1&filter=typeid&typeid=11&typeid=11
          http://www.kanxue.com/bbs/showthread.php?t=190126
      


  • 相关阅读:
    JQuery Easy UI 1.7官网最新版附1.7API
    JS时间戳转换日期格式,附JS脚本详细用法
    JS原生对象实现异步请求以及JQ的ajax请求四种方式
    WebService跨域配置、Ajax跨域请求、附开发过程源码
    反射DataTable转实体类
    前端分页、及分页原理
    源码剖析之sun.misc.Unsafe
    JAVA并发编程学习笔记之CLH队列锁
    java 中的Unsafe
    AbstractQueuedSynchronizer源码解析之ReentrantLock(二)
  • 原文地址:https://www.cnblogs.com/cnsec/p/11515781.html
Copyright © 2020-2023  润新知