Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [HowTo] Show Debug symbols with ndk-stack and QtAndroid on crash
Qt 6.11 is out! See what's new in the release blog

[HowTo] Show Debug symbols with ndk-stack and QtAndroid on crash

Scheduled Pinned Locked Moved Mobile and Embedded
howtodebugcrashandroidadb
4 Posts 2 Posters 186 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    beku2
    wrote last edited by beku2
    #1

    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
    SGaistS 1 Reply Last reply
    0
    • B beku2

      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
      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      B 1 Reply Last reply
      1
      • B beku2 marked this topic as a regular topic
      • SGaistS SGaist

        @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 Offline
        B Offline
        beku2
        wrote last edited by beku2
        #3

        @SGaist Greetings,
        thanks for your comment. Yes, its a HowTo sticker for that topic. Changed.

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          Nice, thanks !

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved