libunwind for arm64-v8a

Skip to first unread message

Jul 9, 2021, 12:47:26 AM7/9/21
to android-ndk
At my organization, we've been using libunwind to get the stack trace of native crashes and dumping that into a log file in order diagnose bugs reported by customers. The native component of our application targets armeabi-v7. We're in the process of updating our software to target arm64-v8a.

There doesn't seem to be a arm64-v8a version of libunwind. I've looked into the NDK files and I can only see a libunwind.a in the arm-linux-androideabi folder. I cannot see a libunwind.a inside the aarch64-linux-android folder. As a result, when building the project the linker will fail to link in symbols for libunwind methods when building for 64bit ARM. 

Is there any way to get the native stack trace inside a signal handler for ARM64?

Jul 9, 2021, 1:34:06 PM7/9/21
to android-ndk
IIRC the "standard" lib did change a few times over the years, but you may want to use libunwindstack. It's a part of AOSP: (or get the latest version)

Jul 16, 2021, 4:34:12 PM7/16/21
to android-ndk
Cheers, thanks for that. I had to clone one of the forked repositories for libunwindstack and compiled that from source (I had to removed a whole of unused cruft to get it to compile under NDK). I've decided to have both armeabi-v7 and arm64-v8a builds of our application to use libunwindstack.
Reply all
Reply to author
0 new messages