androidc++debuggingandroid-ndkndk-gdb

ndk-gdb unable to find gdb.setup


I am trying to use ndk-gdb to debug my native android project. When I run the command ndk-gdb I get the error

 Could not find gdb.setup under ./libs/

Explanation


Solution

  • I just answered in the post: https://stackoverflow.com/a/32972182/1617066

    I ran into the same problem. It seems something changed in recent version of Android Build tools.

    The trick is:

    ERROR: Could not find gdb.setup under ./libs/
    

    It expects gdb.setup is in the directory libs but NOT libs/armeabi

    so the simple workground is to copy gdb.setup and gdbserver from "libs/cpu" to "libs" and it works like a magic!