查找二进制文件中的类符号的来源 [英] Find source of class symbols in binary

查看:68
本文介绍了查找二进制文件中的类符号的来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有趣的问题.我收到的崩溃日志引用了我的应用程序中的一个名为NRURLProtocol的类(具体是在文件NRURLProtocol.m中),根据崩溃日志,该类存在于我的应用程序中,而不存在于iOS框架中.但是,我的项目中没有NRURLProtocol类,也没有任何NRURLProtocol.m文件.通过Google或StackOverflow在线进行的搜索从字面上得出对该类的0个引用.

I have an interesting problem. I'm getting crash logs referencing a class called NRURLProtocol in my app (specifically in the file NRURLProtocol.m), that according to the crash log exists in my app and not in an iOS framework for instance. However, there is no NRURLProtocol class in my project nor any NRURLProtocol.m file. A search online via Google or StackOverflow turns up literally 0 references to this class.

如果我在二进制文件上运行以下命令:

If I run the following command on my binary:

otool -o binary | grep NR

我找到了各种带有NR前缀的类,包括NRURLProtocol.但是,当我在与二进制文件链接的所有静态库上使用相同的otool命令时,我什么也没找到.我在驱动器上找不到名为NRURLProtocol.m的文件.

I find various classes with the NR prefix, including NRURLProtocol. However, when I use the same otool command on all static libraries that my binary links with, I find nothing. I find no file called NRURLProtocol.m on my drive.

我对如何追踪此事感到茫然.此类不仅存在于我的二进制文件中,而且还被某些东西作为URL协议加载.因此,即使otool什么也没找到,看来我正在使用的某些第三方库也包含了它.

I'm at a bit of a loss as to how to track this down. Not only does this class exist in my binary, but it's being loaded as a URL Protocol by something. So it would seem that some 3rd party library I'm using includes it, even though otool finds nothing.

以下是在我的二进制文件中出现的带有NR前缀的类的完整列表:

Here's a full list of classes with the NR prefix that appear in my binary:

NRASIRequestTracker
NRASISupport
NRErrorData
NRLogger
NRNonARCMethods
NRSecureUDID
NRStats
NRStatsEngine
NRSupportability
NRTransactionData
NRURLProtocol
NRNSURLSupport

这里是我链接到的所有第三方静态库:

Here are all of the 3rd party static libraries I'm linking to:

Facebook SDK
HockeyApp SDK
ZipKit
Mixberry SDK (though not actually using it anywhere, currently disabled)
Flurry SDK
Google AdMob SDK
HelpShift SDK
UrbanAirship SDK
libBass (audio library, doesn't contain Objective-C code)
EX2Kit (my own toolkit library, which doesn't contain this code)

有人知道这些类是从哪里来的,或者我可以尝试其他什么命令?

Does anyone have any clue where these classes are coming from, or what other commands I can try?

推荐答案

找到了!不知何故,我错过了我们也使用NewRelic的SDK的事实.给定NR前缀,这应该是显而易见的. otool迅速表明存在问题的类.

Found it! Somehow I missed the fact that we use NewRelic's SDK as well. Which should have been obvious given the NR prefix. otool quickly showed that the offending classes are there.

这篇关于查找二进制文件中的类符号的来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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