[HowTo] Show Debug symbols with ndk-stack and QtAndroid on crash
-
Steps to show debug lines for a NDK C code project:
- enable Debug in your CMake project or in QtCreator
- deploy to Android
- locate your NDK install path containing the ndk-stack binary or start script
- locate your BUILD_PATH containing your libproject-abiXXX.so or likewise named binary objects
That could be in build/Qt_6_11_1_f_r_Android_arm64_v8a_Debug/ for a QtCreator project. - let your project crash
- call on Unix in a command line (assuming one single device connection):
logcat=logcat.txt adb logcat -d > $logcat $NDK/ndk-stack -sym $BUILD_PATH -dump $logcat- ndk-stack greps the crashes and prints them with resolved code line numbers for you
-
Steps to show debug lines for a NDK C code project:
- enable Debug in your CMake project or in QtCreator
- deploy to Android
- locate your NDK install path containing the ndk-stack binary or start script
- locate your BUILD_PATH containing your libproject-abiXXX.so or likewise named binary objects
That could be in build/Qt_6_11_1_f_r_Android_arm64_v8a_Debug/ for a QtCreator project. - let your project crash
- call on Unix in a command line (assuming one single device connection):
logcat=logcat.txt adb logcat -d > $logcat $NDK/ndk-stack -sym $BUILD_PATH -dump $logcat- ndk-stack greps the crashes and prints them with resolved code line numbers for you
@beku2 Hi,
Do I get correctly that you are giving instructions on how to show these debug symbols ?
If that is indeed the case, then I would recommend to change the title to something like
[HowTo] Show Debug...so that it tells people that there are instructions rather than a question and use the "Topic Tools" button to make it a "Normal Topic" because otherwise it will look like an unanswered question rather than a helpful howto. -
B beku2 marked this topic as a regular topic
-
@beku2 Hi,
Do I get correctly that you are giving instructions on how to show these debug symbols ?
If that is indeed the case, then I would recommend to change the title to something like
[HowTo] Show Debug...so that it tells people that there are instructions rather than a question and use the "Topic Tools" button to make it a "Normal Topic" because otherwise it will look like an unanswered question rather than a helpful howto. -
Nice, thanks !