Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does not Xcode generate dSYM for static library

Tags:

xcode

dsym

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

like image 672
Igor Avatar asked May 30 '18 12:05

Igor


1 Answers

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

like image 120
vishalv2050 Avatar answered Nov 04 '22 11:11

vishalv2050