美文网首页
LLDB 调试

LLDB 调试

作者: 小宝_ab67 | 来源:发表于2019-06-27 17:19 被阅读0次
// -n 同 --name
//breakpoint set --name test1
//breakpoint set -n "[ViewController hankTest3:]"
//breakpoint set -n "[ViewController save:]" -n "[ViewController pauseGame:]" -n "[ViewController continueGame:]"
//breakpoint set --name "[ViewController hankTest1:]"
//breakpoint set --name "[ViewController touchesBegan:withEvent:]"
//b -[ViewController pauseGame:]                //有提示
//b -[ViewController touchesBegan:withEvent:]   //有提示
//b -a + 地址
//b -a + 地址[基地址(image list)+偏移值(文件中的值)]
//b -a + 地址[基地址(MachO首地址)+偏移值(MachO文件中的偏移)]

//所有的 touchesBegan:withEvent: 方法
//breakpoint set --selector touchesBegan:withEvent:
//breakpoint set --name touchesBegan:withEvent:

//指定文件(ViewController.m) hankTest1: 方法
//breakpoint set --file ViewController.m --selector hankTest1:
//breakpoint set --file ViewController.m --selector touchesBegan:withEvent:

//整个工程中所有带有hank字段的方法全部打上断点(区分大小写)
//breakpoint set -r hank    //b -r hank(简写)

//禁用
//breakpoint disable 3.1    //禁用一个
//breakpoint delete 3.1     //禁用一个
//breakpoint disable 3      //禁用一组
//breakpoint disable        //禁用所有
//break dis 3

//开启
//breakpoint enable 3.1     //开启一个
//breakpoint enable 3       //开启一组
//breakpoint enable         //开启所有

//删除
//breakpoint delete 3       //删除 组 3
//breakpoint delete         //删除所有


//c                         //继续
//n                         //单步往下走                     //源码级别
//s                         //单步往下走,遇到子函数进去        //源码级别
//ni                                                        //汇编级别
//si                                                        //汇编级别


//查看
//breakpoint list           //break list(简写)        //查看所有断点
//breakpoint list 6                                  //查看 组 6
//breakpoint list 6.1 和 breakpoint list 6 效果一样    //查看 组 6

//help breakpoint

//help

//执行
//expression
//p                 //p 是 expression的简写
//po                //(--object-description)
//help expression
//help p

//p [self.models addObject:[[Person alloc] init]];
//p (Person *)self.models.lastObject;                   //必须要类型转换
//p $0.name = @"xiao";
//p $0.age = 12;
//po $0.name
//po $0.age
//p $0.name
//p $0.age

//查看堆栈信息
//bt
//up                //跟进 往上
//down              //跟进 往下
//frame select 2    //查看方法 frame #2
//frame variable    //查看参数
//p str = @"123"    //修改参数

//thread return     //回滚


//内存断点
//watchpoint set variable p1->_name

//p &p1->_name
//watchpoint set expression 0x00006000017a9a30

//(watchpoint 和 breakpoint用法基本一样)



//breakpoint command add 1          //断点1 输入断点命令
//breakpoint command list 1
//breakpoint command delete 1



//添加 stop-hook
//target stop-hook add -o "frame variable"      //-o 一条命令
//target stop-hook add -o "p self.view"

//target stop-hook list
//target stop-hook delete
//target stop-hook disable



//image lookup -t Person        //查看文件信息
//image list                    //查看某块列表



//register read                     //读取寄存器
//register write + 地址              //写入寄存器
//memory read + 地址                 //读取内存值

相关文章

  • [译]用 LLDB 调试 Swift 代码

    [译]用 LLDB 调试 Swift 代码 [译]用 LLDB 调试 Swift 代码

  • android jni开放中的一些知识点

    lldb调试查看内存 lldb调试更多使用方式问百度

  • iOS LLDB调试

    掌握以下lldb命令,够用. ### LLDB调试总结 eNSString*$str=@"test"...

  • iOS调试工具 - LLDB

    LLDB LLDB是 Xcode 默认的调试工具, 支持调试 c, c++, Objective-C.支持的调试平...

  • iOS之LLDB常用调试命令

    iOS之LLDB常用调试命令熟练使用 LLDB,让你调试事半功倍使用facebook开源的Chisel调试Home...

  • ptrace反调试

    一、iOS调试 iOS调试里面非常常见的就是LLDB调试,LLDB是Xcode自带的调试工具,既可以本地调试Mac...

  • LLDB 调试学习

    LLDB调试必看:与调试器共舞 - LLDB 的华尔兹Facebook/Chisel 安装chisel: Alte...

  • Xcode 调试之 LLDB

    LLDB 是 Xcode 中的默认调试器,支持调试 C、Objective-C、C++,用 LLDB 调试代码的好...

  • 知识点-LLDB调试命令

    lldb是我们平时在打断点时候,打印面板出现的。 lldb是Xcode自带的调试工具,下面是常用的lldb调试命令...

  • LLDB 使用

    LLDB 使用 LLDB(Low Lever Debug)命令结构 其中: (命令)和 (子命令):LLDB调试命...

网友评论

      本文标题:LLDB 调试

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