atos给出___lldb_unnamed_function
我有一个崩溃转储,通常不会象征 – 当我将其拖入Xcode组织者或手动运行symbolicatecrash系统符号显示,但应用程序指令地址都是未经修改的。
我试着用atos来解决这个问题,但是我得到的结果是:
got symbolicator for myarchive.xcarchive/Products/Applications/MyApp.app/MyApp, base address 4000 ___lldb_unnamed_function2115$$MyApp (in MyApp) + 992 ___lldb_unnamed_function2096$$MyApp (in MyApp) + 66 ___lldb_unnamed_function6053$$MyApp (in MyApp) + 348 ___lldb_unnamed_function6064$$MyApp (in MyApp) + 162 ___lldb_unnamed_function6002$$MyApp (in MyApp) + 18 ___lldb_unnamed_function1029$$MyApp (in MyApp) + 416 ___lldb_unnamed_function2280$$MyApp (in MyApp) + 106 ___lldb_unnamed_function2272$$MyApp (in MyApp) + 198 ___lldb_unnamed_function400$$MyApp (in MyApp) + 96 ___lldb_unnamed_function1$$MyApp (in MyApp) + 36
当前映射到___lldb_unnamed_function1$$MyApp (in MyApp) + 36
应该对应于我在main.m中的根调用。 显然,我不知道别人应该怎么做,但我猜如果有人错了,他们都是错的。 什么可能导致这个? ___lldb_unnamed_function通常是否出现在embedded块中的函数之外的其他位置?
不幸的是,这会造成很长的问题,但是由于在计算应用程序二进制文件的载入偏移量时可能会出现错误,所以我将列出我遵循的步骤以产生上述输出。
我用dwarfdump -u myarchive.xcarchive/Products/Applications/MyApp.app/MyApp
来validation我正在使用正确的二进制文件:
UUID: BA41E9A3-4BB5-3F8A-8D57-0D16447FFEC6 (armv7) myarchive.xcarchive/Products/Applications/MyApp.app/MyApp UUID: A6E0970C-05FE-3A79-887D-84F3892637FD (armv7s) myarchive.xcarchive/Products/Applications/MyApp.app/MyApp
崩溃转储中的UUID与第一个相匹配:
Binary Images: 0x97000 - 0x3cefff +MyApp armv7 <ba41e9a34bb53f8a8d570d16447ffec6> /var/mobile/Applications/AF97EC52-7A2F-4772-AA05-74E739BA6882/MyApp.app/MyApp
这一行还列出了0x97000的负载偏移量和armv7的体系结构。 我感兴趣的地址是:
1 MyApp 0x001357dc 0x97000 + 649180 2 MyApp 0x00134446 0x97000 + 644166 3 MyApp 0x00240cec 0x97000 + 1744108 4 MyApp 0x002416ea 0x97000 + 1746666 5 MyApp 0x0023e2de 0x97000 + 1733342 6 MyApp 0x000de724 0x97000 + 292644 7 MyApp 0x00144f1a 0x97000 + 712474 8 MyApp 0x00144336 0x97000 + 709430 27 MyApp 0x000b1024 0x97000 + 106532 28 MyApp 0x0009d464 0x97000 + 25700
所以我运行xcrun atos -l 0x97000 -arch armv7 -o myarchive.xcarchive/Products/Applications/MyApp.app/MyApp 0x001357dc 0x00134446 0x00240cec 0x002416ea 0x0023e2de 0x000de724 0x00144f1a 0x00144336 0x000b1024 0x0009d464
,它给了我上面的输出。
注意:因为这看起来不正确,我想也许我需要手动减去滑动值。 我从xcrun otool -arch armv7 -l myarchive.xcarchive/Products/Applications/MyApp.app/MyApp
的应用包中获得了它:
Load command 0 cmd LC_SEGMENT cmdsize 56 segname __PAGEZERO vmaddr 0x00000000 vmsize 0x00004000 fileoff 0 filesize 0 maxprot 0x00000000 initprot 0x00000000 nsects 0 flags 0x0 Load command 1 cmd LC_SEGMENT cmdsize 736 segname __TEXT vmaddr 0x00004000 vmsize 0x00338000 fileoff 0 filesize 3375104 maxprot 0x00000005 initprot 0x00000005 nsects 10 <snip>
但是,使用-l 0x93000重新运行该命令给了我一个非常相似的结果:
got symbolicator for /Users/arkaaito/Library/Developer/Xcode/Archives/2013-11-07/Zoomingo 11-7-13, 2.14 PM.xcarchive/Products/Applications/Zoomingo.app/Zoomingo, base address 4000 ___lldb_unnamed_function2166$$Zoomingo (in Zoomingo) + 684 ___lldb_unnamed_function2160$$Zoomingo (in Zoomingo) + 182 ___lldb_unnamed_function6165$$Zoomingo (in Zoomingo) + 164 ___lldb_unnamed_function6176$$Zoomingo (in Zoomingo) + 46 ___lldb_unnamed_function6114$$Zoomingo (in Zoomingo) + 70 ___lldb_unnamed_function1129$$Zoomingo (in Zoomingo) + 28 ___lldb_unnamed_function2305$$Zoomingo (in Zoomingo) + 2446 ___lldb_unnamed_function2302$$Zoomingo (in Zoomingo) + 3714 ___lldb_unnamed_function476$$Zoomingo (in Zoomingo) + 512 ___lldb_unnamed_function85$$Zoomingo (in Zoomingo) + 532
您必须使用dSYM
软件包调用dSYM
,而不是应用程序包,因为通常会删除符号!
所以这个电话是:
xcrun atos -l 0x97000 -arch armv7 -o myarchive.xcarchive/dSYMs/MyApp.app.dSYM 0x001357dc 0x00134446 0x00240cec 0x002416ea 0x0023e2de 0x000de724 0x00144f1a 0x00144336 0x000b1024 0x0009d464