use*_*988 5 xcode symbols lldb
我有一个在一个环境中构建的程序,我想在我自己的环境中调试它.我复制了可执行文件,.dSYM和源代码,但我找不到让lldb知道在哪里找到源代码的方法.
例如,在建筑环境中有源文件:
/build_src/rel_path/source1.c
/build_src/rel_path/source1.dSYM
/build_src/rel_path/app1
Run Code Online (Sandbox Code Playgroud)
在我的环境中,文件和.dSYM被复制到:
/source/rel_path/source1.c
/source/rel_path/source1.dSYM
/source/rel_path/app1
Run Code Online (Sandbox Code Playgroud)
有没有办法设置发现路径或任何其他方式重新映射源代码路径?
这就是"target.source-map"设置的用途:
(lldb) settings list target.source-map
source-map -- Source path remappings used to track the change of location between a source file when built, and where it exists on the current system.
It consists of an array of duples, the first element of each duple is some part (starting at the root) of the path to the file when it
was built, and the second is where the remainder of the original build hierarchy is rooted on the local system. Each element of the
array is checked in order and the first one that results in a match wins.
Run Code Online (Sandbox Code Playgroud)
所以在你的情况下,你会这样做:
settings set target.source-map /build_src /source
Run Code Online (Sandbox Code Playgroud)
lldb有一个apropos命令,你可以用它来找到这些埋藏的好东西,所以例如apropos source会向你展示上面的帮助,以及一个很短的其他东西列表.
| 归档时间: |
|
| 查看次数: |
3120 次 |
| 最近记录: |