简体   繁体   English

XCode 找不到特定 iOS 库/框架项目的符号

[英]XCode can't find symbols for a specific iOS library/framework project

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.在一个相当大的 iOS 项目中,我在特定库/框架(Xcode 的新手 - 我不确定正确的术语是什么)的源代码中遇到断点问题。 I have all the code for this library.我有这个库的所有代码。 Breakpoints are working fine everywhere else, but in this one specific library, all breakpoints are ignored.断点在其他任何地方都可以正常工作,但在这个特定的库中,所有断点都被忽略。

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.我可以在从这些源文件之一中调用的函数中放置一个断点,它会触发,但随后调用堆栈显示“__lldb_unnamed_function”作为我感兴趣的文件中的位置,就好像符号已被剥离。

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 

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).我一直在使用很多#ifdefs 来测试一些函数的替代实现,所以我认为有些东西可能会被意外标记为死代码(因此是最后一个设置)。 I already tried clean/rebuild.我已经尝试过清理/重建。 I tried completely removing the app from the target iPhone.我尝试从目标 iPhone 中完全删除该应用程序。 I tried deleting intermediate file folder under我尝试删除下的中间文件夹

/Library/Developer/Xcode/DerivedData

The code is definitely executing because all my NSLog calls show up properly.代码肯定正在执行,因为我所有的 NSLog 调用都正确显示。

I don't have much experience with Xcode so i'm hoping i'm just missing something simple我对 Xcode 没有太多经验,所以我希望我只是错过了一些简单的东西

Thanks谢谢

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.如果您正在生成一个没有调试信息的未剥离的二进制文件,那么您将在回溯等中看到完整的符号名称,您只是没有它们的调试信息。

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.找出谁在做这件事的唯一好方法是查看 Xcode 中的完整构建日志,并展开每个阶段并通过所有构建阶段进行 grub 以找出谁在执行此操作。 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;您可以通过将鼠标悬停在 RHS 上的每条构建行上来扩展阶段,您将获得一个看起来像页面上的一堆行的披露标识; click that to see the real commands.单击以查看实际命令。

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.另一种巧妙的方法可能是为此框架构建 dSYM(通过将调试格式设置为“DWARF + dSYM”。)这应该在任何东西被剥离之前完成,所以除非剥离它的人非常聪明,否则这应该保留调试信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM