LLDB与debugserver
来源:互联网 发布:淘宝卖家会员管理 编辑:程序博客网 时间:2024/06/05 11:19
配置debugserver
默认情况下iOS上并没有安装debugserver,因此需要设备链接一次Xcode,并在Window->Devices菜单中增加此设备后。会被安装到IOS的Developer/usr/bin/目录下。
- 瘦身
接下来我们将当前设备进行从IOS拷贝到我们的mac系统上,进行对debugserver进行瘦身
lipo -thin armv7s ~/debugserver -output ~/debugserver
注意:这里的armv7s
换成对应设备的arm
- 加task_for_pid权限
ent.plist下载到你对应存档debugserver的目录下。
codesign -s - --entitlements ent.plist -f debugserver
- 将处理过后的debugserver放到ios的/usr/bin/debugserver
//附加权限chmod +x /usr/bin/debugserver
- 启动debugserver 附加到进程
debugserver -x backboard IP:poart /path/to/executable //启动executable,并开启port端口,等待来自IP的LLDB接入
debugserver IP:poart -a "ProcessName" //debugserver会附加ProcessName,并开启poart端口,等待来自IP的接入LLDB
注意: IP设置*
代表所有IP可接入
LLDB的使用说明
sudo xcode-select -s /Applications/Xcode6.1.app //进行切换默认编译的xcode 此处Xcode6.为我放在Applications目录下的
首先我们需要启动lldb执行如下命令:
/Applications/Xcode6.1.app/Contents/Developer/usr/bin/lldb
启动LLDB之后,我们就需要链接等待我们接入的debugserver。命令如下
process connect connect://iOSIP:1234
- image list
列举当前进程中的所有模块
image list -o -f
- breakpoint
进行设置中断点:
b function
或
br s -a adress
或
br s -a 'ASLROffset+address'
- print
用来打印 断电停止时内部发生的某处值。
p $r6
查看后 对应地址的内容将被置0 ,因此调用ni
则再次查看r6值变为0
po [$ro class]po $ro
其中po
用来打印Objective-C对象
p (char*)$r1 //通过强制转换的方式打印C语言基本数据类型。
可以使用x命令打印一个地址存放的值。如下:
p/x $sp //以十六进制方式打印sp,它是一个指针x/10 $sp //打印出这个指针指向的连续10个x/10 0x006d333c
LLDB相关命令 :http://lldb.llvm.org/lldb-gdb.html
阅读全文
0 0
- LLDB与debugserver
- LLDB+debugserver动态调试
- lldb+debugserver调试
- lldb +debugserver调试环境部署
- 一步一步用debugserver + lldb代替gdb进行动态调试(整理与补充)
- iOS debugserver + lldb的安装调试
- iOS LLDB + debugserver 进行远程调试APP
- lldb +debugserver调试环境部署(一)
- 用debugserver + lldb代替gdb进行动态调试
- 用debugserver+lldb代替gdb进行iOS远程动态调试
- iOS Hacker LLDB 和 debugserver 实例调试
- iOS 菜鸟逆向学习 (二)----iOS debugserver + lldb的安装调试
- LLDB
- lldb与gdb命令比较
- 编译测试 LLVM与LLDB
- 小笨狼与LLDB的故事
- 配置debugserver
- GDB 与 LLDB 命令对照表
- 手把手搭建企业级服务--5.搭建Tomcat-开放8080端口
- Codeforces 659F F
- java判断两个字符串是否相等?
- css美化radio
- bash: scrapy: command not found
- LLDB与debugserver
- android开发之Fragment
- 3 递归和分治的思想
- 深入理解javascript原型和闭包(3)——prototype原型
- 安卓onSaveInstanceState和onRestoreInstanceState触发的时机
- fastdfs使用实战(Java实例篇)
- 使用caffe训练faster-rcnn时遇到的问题总结
- linux 下使用CMake编译程序
- List<Object>使用Object的某个属性进行排序(正序,倒序)