XCode找不到特定iOS库/框架项目的符号 [英] XCode can't find symbols for a specific iOS library/framework project

查看:163
本文介绍了XCode找不到特定iOS库/框架项目的符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个相当大的iOS项目中特定库/框架的源代码中的断点有问题(Xcode的新功能-我不确定正确的术语是什么)。我有该库的所有代码。断点在其他任何地方都可以正常工作,但是在这个特定的库中,所有断点都将被忽略。

I'm having a problem with breakpoints in the source code of a specific library / framework (new to Xcode - i'm not sure what the correct term is) in a fairly large iOS project. I have all the code for this library. Breakpoints are working fine everywhere else, but in this one specific library, all breakpoints are ignored.

我可以在这些源文件之一中调用的函数中放置一个断点,它将触发,但随后调用堆栈在其中的位置显示 __lldb_unnamed_function我感兴趣的文件,好像符号已被剥离。

I can put a breakpoint in a function called from within one of those source files, and it will trigger, but then the callstack shows "__lldb_unnamed_function" for the location in the file i'm interested in, as if the symbols have been stripped.

我对所讨论的库有以下设置

I have the following settings for the library in question

Generate Debug Symbols = YES
Strip Debug Symbols During Copy = NO
Strip Linked Product = NO
Dead Code Stripping = NO 

我一直在使用很多#ifdefs来测试一些功能的替代实现,因此我认为某些内容可能会偶然被标记为无效代码(因此最后设置)。我已经尝试过清理/重建。我尝试从目标iPhone完全删除该应用程序。我尝试删除

I have been using a lot of #ifdefs to test alternate implementations of a few functions so i thought some stuff might be getting marked as dead code by accident (hence that last setting). I already tried clean/rebuild. I tried completely removing the app from the target iPhone. I tried deleting intermediate file folder under

/Library/Developer/Xcode/DerivedData

由于我的所有NSLog调用均正确显示,因此代码肯定正在执行。

The code is definitely executing because all my NSLog calls show up properly.

我对Xcode没有太多经验,所以我希望我只是缺少一些简单的东西

I don't have much experience with Xcode so i'm hoping i'm just missing something simple

谢谢

推荐答案

构建过程中的某些部分必须剥离此二进制文件。如果您生成的是没有调试信息的未剥离二进制文件,那么您将在回溯中看到完整的符号名称,诸如此类,您将没有它们的调试信息。

Some part of your build process must be stripping this binary. If you were generating an unstripped binary with no debug information, then you would see full symbol names in backtraces and the like, you just wouldn't have debug information for them.

弄清楚谁在执行此操作的唯一好方法是查看Xcode中的完整构建日志,并展开每个阶段并在所有构建阶段中进行grub以确定谁在执行此操作。您将鼠标悬停在RHS的每条构建线上,从而扩展了各个阶段,您将获得一个公开的提示,看起来像是一页上的几行;

The only good way to figure out who is doing this is to look at the full build log in Xcode, and expand each of the stages and grub through all the build stages to figure out who is doing this. You expand the stages by hovering over each build line on the RHS and you'll get a disclosure dingus that looks like a bunch of lines on a page; click that to see the real commands.

另一种解决方法可能是为此框架构建dSYM(通过将调试格式设置为 DWARF + dSYM)。 )那应该在任何东西被剥离之前完成,所以除非有人剥离它,否则它应该非常聪明,这应该保留调试信息。

Another way to finesse this may be to build the dSYM for this framework (by setting the Debug Format to "DWARF + dSYM".) That should get made before anything gets stripped, so unless whoever is stripping this is being awfully clever this should preserve the debug information.

这篇关于XCode找不到特定iOS库/框架项目的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆