Debugging an Android NDK application with CGDB
CGDB is a terminal-based lightweight interface to the
GNU debugger gdb
. It provides a split screen view, which displays the source code along with the debug information. This recipe discusses how to debug Android application with cgdb
.
Getting ready
The following instructions install cgdb
on different operating systems:
If you're using Ubuntu, you can use the following command to install
cgdb
:$ sudo apt-get install cgdb
Alternatively, you can download the source code from http://cgdb.github.com/, and perform the following instructions to install
cgdb
:$ ./configure --prefix=/usr/local $ make $ sudo make install
Note that
cgdb
requireslibreadline
andncurses
development libraries.If you're using Windows, a Windows binary is available at http://cgdb.sourceforge.net/download.php.
If you're using MacOS, you can use the MacPorts installation command as follows:
$ sudo port install cgdb
Please read the Debugging Android NDK Application with NDK GDB...