Android GDB Versions
Debugging Native Android Applications is done using the GNU Debugger (gdb) running on your Windows machine and gdbserver, its counterpart running on the Android phone or tablet. Here's a simple diagram showing how the tools are related:
Modern Android NDK (10+) comes with recent versions of gdb/gdbserver (7.x) that have handle shared library events correctly.
If you are using an older toolchain (gdb 6.x), or are experiencing strange problems with threads or libraries, please switch to a newer gdb/gdbserver.
Information for users of VisualGDB 3.xWarning: the information below is related to older versions of Android NDK and VisualGDB and is not relevant with VisualGDB 4.x+ and Android NDK 10+.
VisualGDB supports 2 versions of GDB/GDBServer tools:
- GDB 6.6 (comes with Android NDK r8)
- GDB 7.4.1 (comes with VisualGDB)
The older version of GDB runs on all Android versions, but has the following limitations
- No support for pending breakpoints
- Cannot debug app startup
- Slower that GDB 7.x
- Crashes more often
The newer GDB 7.4.1 requires Android 2.2 or later (e.g. 2.3.3, 3.x or 4.x).
The older gdbserver does not support debugging NEON instructions
The newer gdbserver 7.4.1 supports NEON, but does not work with old gdb 6.6 (and thus needs Android 2.2 or later). Additionally, it sometimes fails to attach to the app with the Operation not permitted error.
It is recommended to use gdb 7.4.1 and gdbserver 7.4.1. If you do not need the NEON register debugging and encounter the Operation not permitted error when trying to start debugging, downgrade to the old gdbserver.
If you need to debug older Android versions (1.x or 2.1), use the old gdb and gdbserver.
Switching between versions
To switch between several gdb/gdbserver combinations, open VisualGDB Project Properties and change the value of the "GDB/GDBSERVER Versions" combo box.