OStack程序员社区-中国程序员成长平台

标题: ios - 与 `-n` 选项相比,LLDB 中的 `image lookup` 选项到 `-s` 的操作如何? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 16:12
标题: ios - 与 `-n` 选项相比,LLDB 中的 `image lookup` 选项到 `-s` 的操作如何?

我知道 -s 选项会在符号表 (image dump symtab) 中搜索与 匹配的符号。

但是,我不明白 -n 选项是如何工作的。它从 -s 返回不同的结果,如果它没有在符号表中搜索函数/符号,它在哪里寻找

帮助图片查找:

-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.



Best Answer-推荐答案


官方GDB to LLDB command map reference说:

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. 

所以,image lookup -n 只搜索调试符号,而 image lookup -s 搜索非调试符号。

关于ios - 与 `-n` 选项相比,LLDB 中的 `image lookup` 选项到 `-s` 的操作如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57866267/






欢迎光临 OStack程序员社区-中国程序员成长平台 (http://ostack.cn/) Powered by Discuz! X3.4