Shu*_*eng 3 debugging macos ios lldb
我知道该-s选项会在符号表 ( image dump symtab) 中搜索匹配的符号<symbol>。
但是,我不明白该-n选项是如何运作的。它从 返回不同的结果-s,如果它没有在符号表中搜索函数/符号,它会在哪里查找<function-or-symbol>?
help image lookup:
-s <symbol> ( --symbol <symbol> )
Lookup a symbol by name in the symbol tables in one or more target modules.
-n <function-or-symbol> ( --name <function-or-symbol> )
Lookup a function or symbol by name in one or more target modules.
Run Code Online (Sandbox Code Playgroud)
小智 5
This one finds debug symbols:
(lldb) image lookup -r -n <FUNC_REGEX>
This one finds non-debug symbols:
(lldb) image lookup -r -s <FUNC_REGEX>
Provide a list of binaries as arguments to limit the search.
Run Code Online (Sandbox Code Playgroud)
因此,image lookup -n只搜索调试符号,而image lookup -s搜索非调试符号。