iOS Static Library Debug Symbols not being in included in dSYM

前端 未结 2 752
鱼传尺愫
鱼传尺愫 2021-02-07 09:33

I\'m working on a series of iOS apps which will share a common codebase. I\'ve developed the common codebase as a static library and want it\'s debug symbols included in the pri

相关标签:
2条回答
  • 2021-02-07 10:11

    Static lib symbols do show up in an app's dSYM file, and dwarfdump will reveal that.

     dwarfdump -a path/to/app.dSYM >dsymAsText.txt
    

    That should show you the lib's symbols.

    However if you are (as I have been recently) looking for a symbol table to be generated to go along with just your static lib, I have come to the conclusion that it will be fairly useless; once it get compiled into a new app those symbols and addresses will all change and you will have an entirely different offset for everything (please someone correct me if I'm wrong).

    I'm not entirely sure there's a way to get around that part.

    0 讨论(0)
  • 2021-02-07 10:31

    Not sure if you found your answer yet but I had the exact same problem a couple of days ago. I got it to work by doing the following:

    1. Create a workspace to hold your primary project and common code base (static library). Make sure the projects are siblings and not parent/child.
    2. Add a target dependency and link the common codebase
    3. Make sure to include debug symbols in your common codebase
    4. Configure the workspace settings to build all projects in a shared directory (I believe this is the key)
    5. If you get complaints about not being able to find headers you may have to modify your user header search path in the build settings or use the source tree feature.
    0 讨论(0)
提交回复
热议问题