美文网首页
LLDB 使用总结

LLDB 使用总结

作者: 斑驳的流年无法释怀 | 来源:发表于2018-08-04 23:23 被阅读79次

LLDB 使用总结

LLDB简介

LLDB是个开源的内置于XCode的调试工具,可以安装C++或者Python插件。

LLDB的基本语法如下

<command> [<subcommand> [<subcommand>...]] <action> [-options [option-value]] [argument [argument...]]

各种打印

  • printp:打印
  • po:打印对象
(lldb) p argv
(const char **) $2 = 0x00007ffeefbff728
(lldb) p @[@"one", @"two"]
(__NSArrayI *) $3 = 0x000000010224a190 @"2 elements"
(lldb) e -o -- $3
<__NSArrayI 0x10224a190>(
one,
two
)
(lldb) po $3
<__NSArrayI 0x10224a190>(
one,
two
)

对变量进行处理

(lldb) print count
(NSUInteger) $0 = 99
(lldb) print $0 + 7
(unsigned long) $1 = 106
(lldb) expression count = 42
(NSUInteger) $2 = 42
(lldb) e int $a = 2
(lldb) p $a * 19
(int) $0 = 38
(lldb) e NSArray *$array = @[@"one",@"two",@"three"]
(lldb) po $array
<__NSArrayI 0x100741850>(
one,
two,
three
)
(lldb) p [$array count]
(NSUInteger) $0 = 3
(lldb) po [[$array objectAtIndex:0] uppercaseString]
ONE

删除断点

  通过 `br li`命令来查看所有断点列表
  通过`br dis 1`来让第一个断点无效
  通过`br del 1`来删除第一个断

读取内存

memory read/数量格式字节数 内存地址
x/数量格式字节数 内存地址
举例:x/3xw 0x10010

格式
x是16进制,f是浮点,d是10进制

字节大小
b:byte 1字节,h:half word 2字节
w:word 4字节,g:giant word 8字节

修改内存中的值

memory write 内存地址 数值
举例:memory write 0x0000010 10

浅谈LLDB调试器

相关文章

  • LLDB 使用总结

    LLDB 使用总结 LLDB简介 LLDB是个开源的内置于XCode的调试工具,可以安装C++或者Python插件...

  • LLDB 使用总结

    LLDB简介 LLDB是个开源的内置于XCode的调试工具,可以安装C++或者Python插件。 随着Xcode ...

  • LLDB使用总结

    简略命令请点击LLDB命令总结 安装命令集合工具 1、Chisel安装教程常见问题: 解决方案的链接2、Derek...

  • iOS LLDB调试

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

  • 逆向(四) 常见的LLDB 命令

    之前有写过 Xcode动态调试原理 其中会涉及到使用LLDB命令, 今天有时间可以总结一些常用的LLDB命令,可以...

  • LLDB 使用

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

  • iOS -LLDB简单命令

    LLDB语法 在使用LLDB之前,我们来先看看LLDB的语法,了解语法可以帮助我们清晰的使用LLDB: 一眼看上去...

  • LLDB指令全集

    详细介绍请点击:LLDB使用总结 指令详解po _lldbArr打印参数值p _lldbArr打印指针p $1 =...

  • LLDB - 在Python中使用lldb.py

    lldb官方添加办法-在Python中使用lldb.py模块[https://lldb.llvm.org/use/...

  • iOS逆向 lldb动态调试

    前言 使用 lldb 调试需要准备 debugserver。使用 OSX 中的 lldb 远程连接 iOS 上的 ...

网友评论

      本文标题:LLDB 使用总结

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