【发布时间】:2012-12-08 23:33:06
【问题描述】:
我的代码在 (lldb) 提示符处的断点处停止。我可以向对象发送消息并在控制台上打印它们的值。
(lldb) p [self computePI]
(float) $1 = 3.0
哇!在这一点上有些不对劲。我希望能够进入 computePI 作为找出哪些变量被搞砸的捷径。但是,如果我在该选择器上放置一个断点并重试,我会得到:
(lldb) p [self computePI]
error: Execution was interrupted, reason: breakpoint 5.1.
The process has been returned to the state before execution.
如果我此时能以某种方式进入 computePI,那将是一个实时的节省。这可能吗?我一直在看http://lldb.llvm.org 并没有看到任何东西。感谢您的帮助。
更新:根据 Jason Molenda 的回答,我使用以下方便的别名更新了我的 ~/.lldbinit 文件:
command alias nup expr -u 0 --
command alias nupo expr -u 0 -o --
这让我可以使用 nup(代替 p)和 nupo(代替 po)。
【问题讨论】:
标签: objective-c xcode debugging lldb