Class-dump Error: Cannot find offset for address xxxx in dataOffsetForAddress


#1

OS X El Captain, Xcode 7.01.

When I tried to class-dump a PreferencesBundle or Framework under ~/Library/Developer/Xcode/iOS DeviceSupport/7.1.1 (11D201)/Symbols/System/Library/, I got such an error:

pwd
/Users/papillon/Library/Developer/Xcode/iOS DeviceSupport/7.1.1 (11D201)/Symbols/System/Library/PreferenceBundles/MobilePhoneSettings.bundle
$: class-dump MobilePhoneSettings
2015-10-06 16:10:59.492 class-dump[98015:2289687] Error: Cannot find offset for address 0x3a546a04 in dataOffsetForAddress:

pwd
/Users/papillon/Library/Developer/Xcode/iOS DeviceSupport/7.1.1 (11D201)/Symbols/System/Library/Frameworks/AVFoundation.framework
$: class-dump AVFoundation
2015-10-06 16:14:37.696 class-dump[98020:2295299] Error: Cannot find offset for address 0x39c7d0bc in dataOffsetForAddress:

Similar issue here http://stackoverflow.com/questions/3715919/class-dump-gives-error-error-cannot-find-offset-for-address-in-dataoffset-for but it does not work for me.

Any ideas?


砸壳出错,出错信息:“Segmentation fault: 11” 或者 “Operation not permitted”
#2

class-dump do work with the executables (e.g., /Applications/Preferences.app/Preferences) copied from an iOS device. So, maybe the binaries from ~/Library/Developer/Xcode/iOS DeviceSupport/7.1.1 (11D201)/Symbols/System/ is encrypted?


#3

Seems that the built-in binaries are not encrypted:
$: otool -l libraries/System/Library/PreferenceBundles/MobilePhoneSettings.bundle/MobilePhoneSettings | grep LC_ENCRYPTION_INFO
$: otool -l Preferences | grep LC_ENCRYPTION_INFO
Even the App Store binaries are encrypted, class-dump is able to dump them, with meaningless obfuscated symbols.


#4

Thoughts:
dyld_shared_cache is another malformed binary on iOS with shared __LINKEDIT(and many other stuff)so class-dump won’t work.
Maybe that’s the case for your situation
EDIT:
Or written in Swift


#5

I have a same problem,I gusee maybe the reason of swift.


#6

me too,Do you have good solution to this problem