LLDB中的expression命令


先看一下print跟po

print

(‘expression –’) Evaluate an expression on the current thread. Displays any returned value with LLDB’s default formatting. Expects ‘raw’ input (see ‘help raw-input’.)

Syntax: print

Command Options Usage: print

‘print’ is an abbreviation for ‘expression –’

po

Evaluate an expression on the current thread. Displays any returned value with formatting controlled by the type’s author. Expects ‘raw’ input (see ‘help raw-input’.)

Syntax: po

Command Options Usage: po

‘po’ is an abbreviation for ‘expression -O –’

显然这俩命令都是基于expression并且做了一些简单的定制【我一直以为print就是单纯的输出,po就是print object…

然后再看看expression

expression

Evaluate an expression on the current thread. Displays any returned value with LLDB’s default formatting. Expects ‘raw’ input (see ‘help raw-input’.)

Syntax: expression --

后面还有很多就不贴了

结论