isa*_*ent 3 debugging xcode gdb ios lldb
在中lldb
,我得到了help breakpoint set
:
-a <address-expression> ( --address <address-expression> )
Set the breakpoint at the specified address. If the address maps uniquely to a particular binary, then the address will be converted to a "file" address, so that the
breakpoint will track that binary+offset no matter where the binary eventually loads. Alternately, if you also specify the module - with the -s option - then the
address will be treated as a file address in that module, and resolved accordingly. Again, this will allow lldb to track that offset on subsequent reloads. The
module need not have been loaded at the time you specify this breakpoint, and will get resolved when the module is loaded.
Run Code Online (Sandbox Code Playgroud)
和
-r <regular-expression> ( --func-regex <regular-expression> )
Set the breakpoint by function name, evaluating a regular-expression to find the function name(s).
Run Code Online (Sandbox Code Playgroud)
和
-s <shlib-name> ( --shlib <shlib-name> )
Set the breakpoint only in this shared library. Can repeat this option multiple times to specify multiple shared libraries.
Run Code Online (Sandbox Code Playgroud)
现在,我想在command的结果中找到的指定模块/ dylib的每个函数处设置断点image list -f
。
以libobjc.A.dylib
和MyOwn.dylib
为例。我尝试了以下命令,但失败了:
(lldb) breakpoint set -r libobjc.A.dylib
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) b +[ThunderManager load]
Breakpoint 2: where = MyOwn.dylib`+[ThunderManager load] +16 at ThunderManager.m:20, address = 0x000000010489f274
(lldb) breakpoint set -r MyOwn.dylib`*
Breakpoint 3: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
Run Code Online (Sandbox Code Playgroud)
我想lldb
在模块libobjc.A.dylib
或的所有功能MyOwn.dylib
或任何其他指定的已加载模块/共享库的功能上休息。如何在中设置断点lldb
?
(lldb) break set -r . -s libobjc.A.dylib
Run Code Online (Sandbox Code Playgroud)
该-s
选项将共享库作为其值,并将断点限制为指定的共享库。您可以-s
多次指定选项,以指定多个共享库以包含在断点搜索中。
该-r
选项的值是一个正则表达式;如果符号名称与该表达式匹配,它将包含在断点中。 .
匹配所有内容。
lldb教程:
http://lldb.llvm.org/tutorial.html
首先从对lldb命令结构的描述开始,您可能会有所帮助。
归档时间: |
|
查看次数: |
1223 次 |
最近记录: |