Why does not Xcode generate dSYM for static library

半世苍凉 提交于 2019-12-22 05:19:28

问题


I try to compile library and get debug symbols with "DWARF with dSYM File" format. This works for dynamic but not for static libraries.

XCode "Quick help" says that "dSYM file is not needed and will not be created for static library or object file products). [dwarf-with-dsym]"

Can anyone explain why?

Thx


回答1:


I stumbled across this and hope to shed some light on the same

Since a static library is not really an executable it will still contain the symbols in it. So there is no point of a dSYM, when this library will in turn used by another application then there will be a dSYM containing the symbols of the application and the symbols of your static framework.

Dynamic framework on the other hand is an executable in itself in the sense that it is ready to be loaded into an application and liking has already happened on it. So all the symbols of your library have been converted into machine code already, but there is a dSYM which will contain the mapping of your symbols.

Added this for some poor soul like me, lmk if I need to explain this further.



来源:https://stackoverflow.com/questions/50604249/why-does-not-xcode-generate-dsym-for-static-library

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