在 LLDB 中为 Objective-C 设置断点

To set a breakpoint Objective C selectors named alignLeftEdges: you can enter either of:

(lldb) breakpoint set --selector alignLeftEdges: 
(lldb) breakpoint set -S alignLeftEdges:

You can limit any breakpoints to a specific executable image by using the "--shlib <path>" ("-s <path>" for short):

(lldb) breakpoint set --shlib foo.dylib --name foo 
(lldb) breakpoint set -s foo.dylib -n foo

Suggestions on more interesting primitives of this sort are also very welcome.

Just like gdb, the lldb command interpreter does a shortest unique string match on command names, so the following two commands will both execute the same command:

(lldb) breakpoint set -n "-[SKTGraphicView alignLeftEdges:]" 
(lldb) br s -n "-[SKTGraphicView alignLeftEdges:]"

posted @ 2012-12-25 22:26  Proteas  阅读(342)  评论(0编辑  收藏  举报