简体   繁体   中英

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

It specifies the 32 bit short address 0043a05c, which after executing the following command

> ./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

00000000001f6f34

The Unity has libraries for decryption for both 32 bits and 64 bits. 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.

But here's the trouble - when I try to feed addr2line a 64 bit library - it swears that

 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

$ ./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. 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? Or is it already 32 and 64, and I'm just doing something wrong?

  2. Why libunity.sym.so from the x64 folder is not read by addr2line, saying that the file format is not supported? And from the folder x32 is readable, although the name and format are the same! (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?

Found the required utility for 64 bits. The 32-bit utility was located here

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

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. 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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