简体   繁体   English

Addr2line 64位工具

[英]Addr2line 64bit tool

Am looking for errors in the il2cpp build of Unity for android, according to this guide https://support.unity3d.com/hc/en-us/articles/115000292166-Symbolicate-Android-crash根据本指南https://support.unity3d.com/hc/en-us/articles/115000292166-Symbolicate-Android-crash ,我正在寻找适用于 android 的 il2cpp 构建中的错误

It specifies the 32 bit short address 0043a05c, which after executing the following command它指定了 32 位短地址 0043a05c,执行以下命令后

> ./arm-linux-androideabi-addr2line -f -C -e /Applications/Unity.app/Content/PlaybackEngines/AndroidPlayer/Variations/mono/Release/Symbols/armeabi-v7a/libunity.sym.so 0043a05c

Decrypted into a readable stacktrace解密成可读的堆栈跟踪

Thread :: RunThreadWrapper (void *) 18: 06: 51.501: I / DEBUG (242):

But since then, Unity has managed to develop fairly and is now going under ARM64, and in the case of my crashes, the memory addresses are now like this但是从那以后,Unity已经成功地发展到了ARM64下,在我崩溃的情况下,内存地址现在是这样的

00000000001f6f34

The Unity has libraries for decryption for both 32 bits and 64 bits. Unity 具有用于 32 位和 64 位解密的库。 Both are named the same - libunity.sym.so, they just lie in different folders - armeabi-v7 for 32 bits and arm64-v8a for 64 bits.两者的名称相同 - libunity.sym.so,它们只是位于不同的文件夹中 - 32 位的 armeabi-v7 和 64 位的 arm64-v8a。

But here's the trouble - when I try to feed addr2line a 64 bit library - it swears that但问题来了——当我尝试为 addr2line 提供一个 64 位库时——它发誓

 C: \ Program Files \ Unity \ Hub \ Editor \ 2019.2.19f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ NDK \ toolchains \ arm-linux-androideabi-4.9 \ prebuilt \ windows-x86_64 \ bin \ arm64-v8a \ libunity. sym.so: File format not recognized

When I use 32 bit lib, everything goes ok当我使用 32 位库时,一切正常

$ ./arm-linux-androideabi-addr2line -f -C -e "C: \ Program Files \ Unity \ Hub \ Editor \ 2019.2.19f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ NDK \ toolchains \ arm-linux-androideabi -4.9 \ prebuilt \ windows-x86_64 \ bin \ armeabi-v7a \ libunity.sym.so "00000000001f6f34
mbedtls :: SuiteTLSModule_MbedtlskUnitTestCategory :: Testpubkey_ParsePem_Return_Object_And_Raise_NoError_ForPEMEncodedObjectWithoutNullTerminationHelper :: RunImpl ()
??:?

But the address is most likely wrong - as I am trying to decrypt a long address using 32 bit lib.但是地址很可能是错误的 - 因为我正在尝试使用 32 位库解密一个长地址。 And the crash unit itself in debug mode tells me that the stacktrace of this crash is different调试模式下的崩溃单元本身告诉我这次崩溃的堆栈跟踪是不同的

 00000000001f6f34 /data/app/сcom.myappName/lib/arm64/libunity.so (DebugStringToFilePostprocessedStacktrace (DebugStringToFileData const &) + 872)

In this regard, a few questions.对此,提几个问题。

  1. Is there a 64 bit addr2line or some similar tool?是否有 64 位 addr2line 或一些类似的工具? Or is it already 32 and 64, and I'm just doing something wrong?还是已经是 32 和 64,而我只是做错了什么?

  2. Why libunity.sym.so from the x64 folder is not read by addr2line, saying that the file format is not supported?为什么addr2line不读取x64文件夹中的libunity.sym.so,说不支持文件格式? And from the folder x32 is readable, although the name and format are the same!并且从文件夹 x32 是可读的,虽然名称和格式是一样的! (libunity.sym.so) (libunity.sym.so)

  3. If there are more normal tools, perhaps in guey, to choose whether to decrypt, select a stack trace - and she herself got the memory addresses from the stack trace and converted them into a readable stack trace?如果有更普通的工具,也许在guey,选择是否解密,选择堆栈跟踪 - 她自己从堆栈跟踪中获取内存地址并将它们转换为可读的堆栈跟踪?

Found the required utility for 64 bits.找到 64 位所需的实用程序。 The 32-bit utility was located here 32 位实用程序位于此处

C: \ Program Files \ Unity \ Hub \ Editor \ 2019.2.19f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ NDK \ toolchains \ arm-linux-androideabi-4.9 \ prebuilt \ windows-x86_64 \ bin \ arm-linux-androideabi- addr2line.exe

And 64 bits are here 64位在这里

C: \ Program Files \ Unity \ Hub \ Editor \ 2019.2.19f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ NDK \ toolchains \ aarch64-linux-android-4.9 \ prebuilt \ windows-x86_64 \ bin \ aarch64-linux-android- addr2line.exe

And it's called a little differently - aarch64-linux-android-addr2line.它的名称略有不同 - aarch64-linux-android-addr2line。 Despite the fact that the name of the utility does not contain the word arm, it successfully decrypts stacktraces from under arm64-v8 and normally perceives characters for arm64-v8尽管该实用程序的名称不包含单词 arm,但它成功解密了 arm64-v8 下的堆栈跟踪,并且通常可以识别 arm64-v8 的字符

The rest of the commands are the same, ie其余命令相同,即

./aarch64-linux-android-addr2line -f -C -e "C: \ Program Files \ Unity \ Hub \ Editor \ 2019.2.19f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ NDK \ toolchains \ arm-linux-androideabi- 4.9 \ prebuilt \ windows-x86_64 \ bin \ arm64-v8a \ libunity.sym.so "00000000001f6f34

Returns normal stack trace for memory address 00000000001f6f34返回内存地址 00000000001f6f34 的正常堆栈跟踪

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

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