简介
LLDB 是新一代高性能调试器. 它是由一组可重用组件的构成, 这些组件大多是 LLVM 工程中的类库,比如 Clang 表达式解析器和 LLVM 汇编程序。LLDB 是 Xcode 中默认的调试器,并且支持调试 C、C++ 以及 Objcetive-C 程序(桌面应用调试、真机调试、模拟器调试),详情参考官方文档。
一、LLDB语法
1.1. 语法格式
<command> [<subcommand> [<subcommand>...]] <action> [-options [option-value]] [argument [argument...]]
- <command>和<subcommand>:命令/子命令,LLDB调试命令的名称。命令和子命令按层级结构来安排,一个命令对象为跟随其的子命令对象创建一个上下文,子命令又为其子命令创建一个上下文,依次类推。
- <action>:执行命令的操作
- <option>:命令选项
- <argument>:命令的参数
- []:表示可选
举个例子:
breakpoint set -n main
# 以上这个命令对应到上面的语法就是:
# 1. command:breakpoint表示断点命令
# 2. action:set表示设置断点
# 3. option: -n表示根据方法name设置断点
# 4. argument:main表示方法名为mian
1.2. 原始/raw 命令
LLDB支持不带命令选项(options)的原始(raw)命令,原始命令会将命令后面的所有东西当做参数(argument)传递。不过很多原始命令也可以带命令选项,当你使用命令选项的时候,需要在命令选项后面加--区分命令选项和参数。
e.g:常用的expression就是raw命令,一般情况下我们使用expression打印一个东西是这样的:
(lldb) expression count
(int) $2 = 4
当我们想打印一个对象的时候。需要使用-o/O命令选项,我们应该用--将命令选项和参数区分:
(lldb) expression -o -- self
<ViewController: 0x100b10dc0>
#缩写“po self”效果一样
1.3. 唯一匹配原则
LLDB的命令遵循唯一匹配原则:假如根据前n个字母已经能唯一匹配到某个命令,则只写前n个字母等效于写下完整的命令。
e.g: 前面提到我设置断点的命令,我们可以使用唯一匹配原则简写,下面命令等效:
expression -o -- self
与
exp -o -- self
breakpoint set -n main
与
br s -n main
1.4. 持久化和自定义命令
LLDB有了一个启动时加载的文件/.lldbinit,每次启动都会加载。所以一些初始化的工作,我们可以写入/.lldbinit中,比如给命令定义别名等。但是由于这时候程序还没有真正运行,也有部分操作无法在里面玩,比如设置断点。一些便利调试命令可以安装Facebook的Chisel
添加步骤:
- 打开终端,输入
vi ~/.lldbinit
进入文件编辑。 - 写入自定义内容,创建一个命令别名如:command alias 打印堆栈 thread backtrace。
- 然后
ESC
键,出现冒号后输入wq
,enter
键保存并退出编辑。
二、 LLDB命令
2.1. 打印值、修改值、调用方法
2.1.1 expression
expression命令的作用是执行一个表达式,并将表达式返回的结果输出,可以打印又可以修改值。
expression <cmd-options> -- <expr>
# 1. <cmd-options>:命令选项,一般情况下使用默认的即可,不需要特别标明。
# 2. --: 命令选项结束符,表示所有的命令选项已经设置完毕,如果没有命令选项,--可以省略
# 3. <expr>: 要执行的表达式
执行某个表达式:
# 改变颜色
(lldb) expression -- self.view.backgroundColor = [UIColor redColor]
# 刷新界面
(lldb) expression -- (void)[CATransaction flush]
将返回值输出:
(lldb) expression -- self
(ViewController *) $0 = 0x0000000121d0fab0
2.1.2. p、po 打印值
打印相关的命令有:p、po。p 和 po 的区别在于使用 po 只会输出对应的值,而 p 则会返回值的类型以及命令结果的引用名。
(lldb) p (CGFloat)self.view.frame.size.width
(CGFloat) $3 = 414
(lldb) po (CGFloat)self.view.frame.size.width
414
(lldb) p self
(ViewController *) $2 = 0x0000000121d0fab0
(lldb) po self
<ViewController: 0x121d0fab0>
# 结论
# po:输出值
# p:输出值+值类型+引用名+内存地址
常量的进制转换:
# 默认打印为10进制
(lldb) p 100
(int) $7 = 100
# 转16进制
(lldb) p/x 100
(int) $8 = 0x00000064
# 转8进制
(lldb) p/o 100
(int) $9 = 0144
# 转二进制
(lldb) p/t 100
(int) $10 = 0b00000000000000000000000001100100
# 字符转10进制数字
(lldb) p/d 'a'
(char) $11 = 97
# 10进制数字转字符
(lldb) p/c 97
(int) $12 = a\0\0\0
2.1.3. call 方法调用
在断点调用某个方法,并输出此方法的返回值
(lldb) call [self.view backgroundColor]
(UIDeviceRGBColor *) $15 = 0x0000000283c14240
# call:同样为输出值+值类型+引用名
2.2. Thread
2.2.1. 堆栈打印 thread backtrace
如果嫌堆栈打印太长,可以加一个值限制,如bt 5,只打印5帧
(lldb) bt 5
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 3.1
* frame #0: 0x000000010068a63c TestRuntimeDemo`-[ViewController viewDidLoad](self=0x0000000121d0fab0, _cmd="viewDidLoad") at ViewController.m:24
frame #1: 0x00000001ddd7220c UIKitCore`-[UIViewController loadViewIfRequired] + 1000
frame #2: 0x00000001ddd7263c UIKitCore`-[UIViewController view] + 28
frame #3: 0x00000001de370848 UIKitCore`-[UIWindow addRootViewControllerViewIfPossible] + 136
frame #4: 0x00000001de370df0 UIKitCore`-[UIWindow _setHidden:forced:] + 272
查看线程列表,第一个线程为当前执行线程:
(lldb) thread list
2.2.2. thread return 跳出当前方法的执行
Debug的时候,也许会因为各种原因,我们不想让代码执行某个方法,或者要直接返回一个想要的值。这时候就使用 thread return。
//跳出方法
(lldb) thread return
//让带有返回int值的方法直接跳出,并返回值10
(lldb) thread return 10
2.2.3. 流程控制
使用Xcode自带的可视化工具来控制 "继续","暂停","下一步","进入","跳出"更简单或使用lldb命令
# 继续
(lldb) continue或c
# 下一步
(lldb) next或n
# 进入
(lldb) step或s
# 跳出
(lldb) finish或f
2.2.4. 跳帧 frame select N
"2.2.1. 堆栈打印 thread backtrace" 中打印的5帧,如果跳帧到第1帧:frame select 1
(lldb) frame select 1
2.2.5. 查看帧变量 frame variable
(lldb) frame variable
(ViewController *) self = 0x0000000102c107e0
(SEL) _cmd = "viewDidLoad"
2.3. Image
2.3.1. image lookup -address 查找崩溃位置
当你遇见数组崩溃,你又没有找到崩溃的位置,只扔给你一堆报错信息,这时候image lookup来帮助你。
在 Xcode 调试程序时,程序出现bug崩溃后,偏偏在控制台显示的崩溃堆栈看不到具体的函数调用信息以及函数行号等,iOS5.0开始做了某些修改,Xcode显示的崩溃信息里不打印方法名了。
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndexedSubscript:]: index 5 beyond bounds [0 .. 4]'
*** First throw call stack:
(0x1b1137ea0 0x1b0309a40 0x1b10af470 0x1b103f76c 0x100ab53d4 0x1de560540 0x1de560a88 0x1de52c160 0x1de54a04c 0x1de7deea4 0x1b572ac70 0x1b572fc00 0x1b568e718 0x1b56bd04c 0x1de36201c 0x1b10c77a8 0x1b10c243c 0x1b10c29dc 0x1b10c21cc 0x1b3339584 0x1de339054 0x100ab4328 0x1b0b82bb4)
libc++abi.dylib: terminating with uncaught exception of type NSException
"First throw call stack"后面显示的全是十六进制的地址,根本无法定位到崩溃的代码,以前崩溃之后是会显示详细的调用的方法名等信息。
解决方案:主动抛出异常,定义一个异常捕获函数,并程序初始化的时候调用捕获函数。(Xcode 4.2 debug doesn't symbolicate stack call)
void uncaughtExceptionHandler(NSException*exception){
NSLog(@"CRASH: %@", exception);
NSLog(@"Stack Trace: %@",[exception callStackSymbols]);
// Internal error reporting
}
-(BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
// Normal launch stuff
}
打印堆栈
Stack Trace: (
0 CoreFoundation 0x00000001b1137eb8 <redacted> + 252
1 libobjc.A.dylib 0x00000001b0309a40 objc_exception_throw + 56
2 CoreFoundation 0x00000001b10af470 _CFArgv + 0
3 CoreFoundation 0x00000001b103f76c <redacted> + 0
4 ShareSDKDemo 0x0000000100d113d4 -[MOBPlatformViewController tableView:cellForRowAtIndexPath:] + 1132
5 UIKitCore 0x00000001de560540 <redacted> + 684
6 UIKitCore 0x00000001de560a88 <redacted> + 80
7 UIKitCore 0x00000001de52c160 <redacted> + 2256
8 UIKitCore 0x00000001de54a04c <redacted> + 140
9 UIKitCore 0x00000001de7deea4 <redacted> + 1380
10 QuartzCore 0x00000001b572ac70 <redacted> + 184
11 QuartzCore 0x00000001b572fc00 <redacted> + 324
12 QuartzCore 0x00000001b568e718 <redacted> + 340
13 QuartzCore 0x00000001b56bd04c <redacted> + 608
14 UIKitCore 0x00000001de36201c <redacted> + 256
15 CoreFoundation 0x00000001b10c77a8 <redacted> + 32
16 CoreFoundation 0x00000001b10c243c <redacted> + 412
17 CoreFoundation 0x00000001b10c29dc <redacted> + 1264
18 CoreFoundation 0x00000001b10c21cc CFRunLoopRunSpecific + 436
19 GraphicsServices 0x00000001b3339584 GSEventRunModal + 100
20 UIKitCore 0x00000001de339054 UIApplicationMain + 212
21 ShareSDKDemo 0x0000000100d10328 main + 148
22 libdyld.dylib 0x00000001b0b82bb4 <redacted> + 4
)
寻找上面堆栈项目(以ShareSDKDemo工程并添加一个数组越界Bug做测试)的标识,看到frame4位置,你只需如下操作查找位置:
(lldb) image lookup -a 0x0000000100d113d4
Address: ShareSDKDemo[0x00000001000313d4] (ShareSDKDemo.__TEXT.__text + 173816)
Summary: ShareSDKDemo`-[MOBPlatformViewController tableView:cellForRowAtIndexPath:] + 1132 at MOBPlatformViewController.m:93
项目中MOBPlatformViewController.m:93行就是触发异常位置,当然我们也可以在Xcode中添加一个All Exceptions类型的异常断点能直接定位到程序代码执行奔溃位置。
2.3.2. image lookup -name 查找方法来源
此命令可以用来查找方法的来源(包括第三方SDK的方法)。
例如查找test方法
(lldb) image lookup -n test
2 matches found in /Users/xxx/Library/Developer/Xcode/DerivedData/TestRuntimeDemo-aiszjzwyjeynznfgpbzrfdjolegb/Build/Products/Debug-iphoneos/TestRuntimeDemo.app/TestRuntimeDemo:
Address: TestRuntimeDemo[0x0000000100006358] (TestRuntimeDemo.__TEXT.__text + 472)
Summary: TestRuntimeDemo`-[Son test] at Son.m:24 Address: TestRuntimeDemo[0x0000000100006744] (TestRuntimeDemo.__TEXT.__text + 1476)
Summary: TestRuntimeDemo`-[Person test] at Person.m:25
2.3.3. image lookup -type 查看成员
查看某个class的所有属性和成员变量。
(lldb) image lookup -t ViewController
Best match found in /Users/xxx/Library/Developer/Xcode/DerivedData/TestRuntimeDemo-aiszjzwyjeynznfgpbzrfdjolegb/Build/Products/Debug-iphoneos/TestRuntimeDemo.app/TestRuntimeDemo:
id = {0x30000002b}, name = "ViewController", byte-size = 24, decl = ViewController.h:11, compiler_type = "@interface ViewController : UIViewController{
NSString * _navTitle;
NSString * _eventCode;
}
@property ( getter = navTitle,setter = setNavTitle:,readwrite,copy,nonatomic ) NSString * navTitle;
@property ( getter = eventCode,setter = setEventCode:,readwrite,copy,nonatomic ) NSString * eventCode;
@end"
2.4. breakpoint 断点
2.4.1. 文件名+行号 breakpoint set -f xxx -l xxx
在Xcode的代码编辑界面,在某一行点下断点,此操作我下面命令相同。
(lldb) breakpoint set -f ViewController.m -l 30
Breakpoint 3: where = TestRuntimeDemo`-[ViewController viewDidLoad] + 476 at ViewController.m:30, address = 0x0000000104e9232c
2.4.2. 函数名断点
2.4.2.1. 方法名断点 breakpoint set -n 方法名
(lldb) breakpoint set -n viewDidLoad
Breakpoint 11: 240 locations.
Xcode也有函数名断点,通过添加符号断点"Symbolic Breakpoint" Symbol值填写viewDidLoad就与上面的lldb命令等同,同时Xcode还提示含有viewDidLoad方法的每个类显示出断点的位置(行号)。
2.4.2.2. 类中方法断点 breakpoint set -n "-[类名 方法名]"
(lldb) breakpoint set -n "-[MobShareViewController viewDidLoad]"
Breakpoint 13: where = ShareSDKDemo`-[MobShareViewController viewDidLoad] + 40 at MobShareViewController.m:48, address = 0x00000001008186f8
注意:这里必须使用""将值括起来,其中-代表实例方法,亦可使用+代表类方法
Xcode可通过符号断点"Symbolic Breakpoint" Symbol值填写"-[类名 方法名]"来实现,通过符号断点也可以跟踪C/C++函数。
2.4.3. 条件断点 breakpoint set -c "xxxx"
和Xcode中符号断点功能相同,如在MOBQQViewController.m的第50行加断点并且条件为parameters不为nil。操作如下:
lldb) breakpoint set -f MOBQQViewController.m -l 50 -c "parameters != nil"
Breakpoint 6: where = ShareSDKDemo`-[MOBQQViewController shareText] + 160 at MOBQQViewController.m:50, address = 0x0000000102fbaee0
2.4.4. 查看断点列表 breakpoint list
(lldb) breakpoint list
Current breakpoints:
1: names = {'objc_exception_throw', '__cxa_throw'}, locations = 2, resolved = 2, hit count = 0
1.1: where = libobjc.A.dylib`objc_exception_throw, address = 0x0000000195401a08, resolved, hit count = 0
1.2: re-exported target = libc++abi.dylib`__cxa_throw, address = 0x00000001953f49bc, resolved, hit count = 0
2: file = '/Users/xxx/Documents/Develop/svn_develop/ShareSDK/Sample/ShareSDKDemo/ShareSDKDemo/PlatformViewControllers/MOBQQViewController.m', line = 32, exact_match = 0, locations = 1, resolved = 1, hit count = 0
2.1: where = ShareSDKDemo`-[MOBQQViewController shareText] + 56 at MOBQQViewController.m:32, address = 0x0000000104fdecb8, resolved, hit count = 0
2.4.5. 禁用/启用断点 breakpoint disable/enable
(lldb) breakpoint disable 2
1 breakpoints disabled.
(lldb) breakpoint list
Current breakpoints:
1: names = {'objc_exception_throw', '__cxa_throw'}, locations = 2, resolved = 2, hit count = 0
1.1: where = libobjc.A.dylib`objc_exception_throw, address = 0x0000000195401a08, resolved, hit count = 0
1.2: re-exported target = libc++abi.dylib`__cxa_throw, address = 0x00000001953f49bc, resolved, hit count = 0
2: file = '/Users/xxx/Documents/Develop/svn_develop/ShareSDK/Sample/ShareSDKDemo/ShareSDKDemo/PlatformViewControllers/MOBQQViewController.m', line = 32, exact_match = 0, locations = 1 Options: disabled
2.1: where = ShareSDKDemo`-[MOBQQViewController shareText] + 56 at MOBQQViewController.m:32, address = 0x0000000104fdecb8, unresolved, hit count = 0
2.4.6. 移除断点 breakpoint delete
(lldb) breakpoint delete 2
1 breakpoints deleted; 0 breakpoint locations disabled.
(lldb) breakpoint list
Current breakpoints:
1: names = {'objc_exception_throw', '__cxa_throw'}, locations = 2, resolved = 2, hit count = 0
1.1: where = libobjc.A.dylib`objc_exception_throw, address = 0x0000000195401a08, resolved, hit count = 0
1.2: re-exported target = libc++abi.dylib`__cxa_throw, address = 0x00000001953f49bc, resolved, hit count = 0
3: name = '', locations = 0 (pending)
2.5. 别名
LLDB中已经有一些命令的别名,比如p是frame variable的别名,p view实际上是frame variable view。除了系统自建的LLDB别名,你也可以自定义别名。
2.5.1. 自定义别名 command alias
LLDB完整的命令有时候是很长的,例如image lookup --address
这个命令。为了方便日常使用,提高效率,LLDB命令提供通过简称的方式调用命令。
(lldb) command alias 打印堆栈 thread backtrace
(lldb) 打印堆栈 3
thread #3
frame #0: 0x0000000195e4ece8 libsystem_pthread.dylib`start_wqthread
# 上面3表示线程标识 可以通过Xcode左侧Debug栏查看线程,不建议使用中文,这里仅测试
2.5.2. 带参数别名 command alias %1 %2
(lldb) command alias 删除断点 breakpoint delete %1
(lldb) breakpoint list
(lldb) 删除断点 3
2.5.3. 创建别名持久化
见 1.4. 持久化和自定义命令
2.6. 汇编调试(Xcode->Debug->Debug workflow->Always Show Disassembly)
# 查看寄存器
(lldb) register read --all
General Purpose Registers:
x0 = 0x00000001046240d8 @"test_Son"
x1 = 0x00000001a9bd3b82
x2 = 0x0000000000000001
x3 = 0x0000000000000000
x4 = 0x000000016b7e10d8
x5 = 0x0000000000000040
x6 = 0x006e6f737265505f
x7 = 0x000000000000003a
x8 = 0x00000001046250c0 "numberWithInt:"
x9 = 0x00000001046250e0 (void *)0x00000001d002a5c8: NSNumber
x10 = 0x0000000000000303
x11 = 0x00000001d24ceb15
x12 = 0x00000001d24ceb15
x13 = 0x0000000000000008
x14 = 0x000000000000001f
x15 = 0x0000000080000000
x16 = 0x000000019541b874 libobjc.A.dylib`objc_unsafeClaimAutoreleasedReturnValue
x17 = 0x0000000104624010 (void *)0x00000001048b4528: initialPoolContent + 792
x18 = 0x0000000000000000
x19 = 0x00000001d005f9d4 UIKitCore`_UIApplicationLinkedOnVersion
x20 = 0x0000000155e13210
x21 = 0x0000000000000018
x22 = 0x00000001c39754b1 "count"
x23 = 0x0000000000000000
x24 = 0x0000000000000001
x25 = 0x0000000000000001
x26 = 0x0000000000000280
x27 = 0x0000000000000010
x28 = 0x00000002810e87e0
fp = 0x000000016b7e1360
lr = 0x00000001046220e8 TestRuntimeDemo`-[ViewController viewDidLoad] + 184 at ViewController.m:28
sp = 0x000000016b7e12d0
pc = 0x00000001046220fc TestRuntimeDemo`-[ViewController viewDidLoad] + 204 at ViewController.m:29
cpsr = 0x80000000
w0 = 0x046240d8
w1 = 0xa9bd3b82
w2 = 0x00000001
w3 = 0x00000000
w4 = 0x6b7e10d8
w5 = 0x00000040
w6 = 0x7265505f
w7 = 0x0000003a
w8 = 0x046250c0
w9 = 0x046250e0
w10 = 0x00000303
w11 = 0xd24ceb15
w12 = 0xd24ceb15
w13 = 0x00000008
w14 = 0x0000001f
w15 = 0x80000000
w16 = 0x9541b874
w17 = 0x04624010
w18 = 0x00000000
w19 = 0xd005f9d4
w20 = 0x55e13210
w21 = 0x00000018
w22 = 0xc39754b1
w23 = 0x00000000
w24 = 0x00000001
w25 = 0x00000001
w26 = 0x00000280
...
# 给方法加断点进入断点时x0~x7寄存器存放参数,调用完x0放返回值
# 打印x0寄存器值
register read x0
# 通过“register write 寄存器名称 数值”格式修改寄存器上的值
2.7. 其他
以上只是抽出个别简单介绍了下,然而LLDB的命令远不只有这些,想知道跟多,输入help查看
(lldb) help
Debugger commands:
apropos -- List debugger commands related to a word or subject.
breakpoint -- Commands for operating on breakpoints (see 'help b' for
shorthand.)
bugreport -- Commands for creating domain-specific bug reports.
command -- Commands for managing custom LLDB commands.
disassemble -- Disassemble specified instructions in the current
target. Defaults to the current function for the
current thread and stack frame.
expression -- Evaluate an expression on the current thread. Displays
any returned value with LLDB's default formatting.
frame -- Commands for selecting and examing the current thread's
stack frames.
gdb-remote -- Connect to a process via remote GDB server. If no host
is specifed, localhost is assumed.
gui -- Switch into the curses based GUI mode.
help -- Show a list of all debugger commands, or give details
about a specific command.
kdp-remote -- Connect to a process via remote KDP server. If no UDP
port is specified, port 41139 is assumed.
language -- Commands specific to a source language.
log -- Commands controlling LLDB internal logging.
memory -- Commands for operating on memory in the current target
process.
platform -- Commands to manage and create platforms.
plugin -- Commands for managing LLDB plugins.
process -- Commands for interacting with processes on the current
platform.
quit -- Quit the LLDB debugger.
register -- Commands to access registers for the current thread and
stack frame.
script -- Invoke the script interpreter with provided code and
display any results. Start the interactive interpreter
if no code is supplied.
settings -- Commands for managing LLDB settings.
source -- Commands for examining source code described by debug
information for the current target process.
statistics -- Print statistics about a debugging session
target -- Commands for operating on debugger targets.
thread -- Commands for operating on one or more threads in the
current process.
type -- Commands for operating on the type system.
version -- Show the LLDB debugger version.
watchpoint -- Commands for operating on watchpoints.
Current command abbreviations (type 'help command alias' for more info):
add-dsym -- Add a debug symbol file to one of the target's current modules
by specifying a path to a debug symbols file, or using the
options to specify a module to download symbols for.
attach -- Attach to process by ID or name.
b -- Set a breakpoint using one of several shorthand formats.
bt -- Show the current thread's call stack. Any numeric argument
displays at most that many frames. The argument 'all' displays
all threads.
c -- Continue execution of all threads in the current process.
call -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
continue -- Continue execution of all threads in the current process.
detach -- Detach from the current target process.
di -- Disassemble specified instructions in the current target.
Defaults to the current function for the current thread and
stack frame.
dis -- Disassemble specified instructions in the current target.
Defaults to the current function for the current thread and
stack frame.
display -- Evaluate an expression at every stop (see 'help target
stop-hook'.)
down -- Select a newer stack frame. Defaults to moving one frame, a
numeric argument can specify an arbitrary number.
env -- Shorthand for viewing and setting environment variables.
exit -- Quit the LLDB debugger.
f -- Select the current stack frame by index from within the current
thread (see 'thread backtrace'.)
file -- Create a target using the argument as the main executable.
finish -- Finish executing the current stack frame and stop after
returning. Defaults to current thread unless specified.
image -- Commands for accessing information for one or more target
modules.
j -- Set the program counter to a new address.
jump -- Set the program counter to a new address.
kill -- Terminate the current target process.
l -- List relevant source code using one of several shorthand formats.
list -- List relevant source code using one of several shorthand formats.
n -- Source level single step, stepping over calls. Defaults to
current thread unless specified.
next -- Source level single step, stepping over calls. Defaults to
current thread unless specified.
nexti -- Instruction level single step, stepping over calls. Defaults to
current thread unless specified.
ni -- Instruction level single step, stepping over calls. Defaults to
current thread unless specified.
p -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
parray -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
po -- Evaluate an expression on the current thread. Displays any
returned value with formatting controlled by the type's author.
poarray -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
print -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
q -- Quit the LLDB debugger.
r -- Launch the executable in the debugger.
rbreak -- Sets a breakpoint or set of breakpoints in the executable.
repl -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
run -- Launch the executable in the debugger.
s -- Source level single step, stepping into calls. Defaults to
current thread unless specified.
si -- Instruction level single step, stepping into calls. Defaults to
current thread unless specified.
sif -- Step through the current block, stopping if you step directly
into a function whose name matches the TargetFunctionName.
step -- Source level single step, stepping into calls. Defaults to
current thread unless specified.
stepi -- Instruction level single step, stepping into calls. Defaults to
current thread unless specified.
t -- Change the currently selected thread.
tbreak -- Set a one-shot breakpoint using one of several shorthand
formats.
undisplay -- Stop displaying expression at every stop (specified by stop-hook
index.)
up -- Select an older stack frame. Defaults to moving one frame, a
numeric argument can specify an arbitrary number.
x -- Read from the memory of the current target process.
For more information on any command, type 'help <command-name>'.