Attaching sources to a binary dylib in Xcode

痞子三分冷 提交于 2019-11-30 06:25:49

To debug code built on one machine but debugged on another you have to build a dSYM and have that available on the machine on which you are debugging. If you haven't done that, nothing is going to work.

Next thing to check is that lldb is picking up the dSYM. This page has some description of how this process works:

http://lldb.llvm.org/symbols.html

but if all else fails, you can use the add-dsym command to add it by hand.

If that still hasn't fixed your problem, then pick some symbol in your dylib, and do:

(lldb) image lookup -vn <SYMBOL_NAME>

or alternately find some address in the loaded dylib and do:

(lldb) image lookup -va <ADDRESS>

If lldb found the dSYM and the debug info is correct, one of the lines of output should be the entry for the "Compile Unit". That is what the debug info says the path to the source file is. The appropriate base of that path is what you should use in target.source-map. If you don't see that entry, then the debug information for that compilation unit is getting lost somehow.

If all those things look good and lldb still isn't seeing the source files, then you are likely hitting a bug, in which case please file a bug with http://bugreporter.apple.com.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!