Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK Debugging

The Android NDK documentation doesn't seem all that clear to me as to what sequence of commands you run to get debugging information into, and out of the ndk-gdb executable which is provided. If there is a format for what lines to break on, and in what file, is there a specification somewhere? If so, also, how do you give this debugger that information, and through what means? I'm clueless in every way as to how this process works.

Thanks

like image 232
Kalen Avatar asked Apr 07 '11 04:04

Kalen


People also ask

What is Android NDK used for?

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android, and provides platform libraries you can use to manage native activities and access physical device components, such as sensors and touch input.

How can you debug your app when it's already released?

In Eclipse, go to Window->Show View->Devices. Look at the Devices view which should now be visible, you should see your device listed. If your device isn't listed, you'll have to track down the ADB drivers for your phone before continuing. If you want to step through code, set a breakpoint somewhere in your app.


1 Answers

Specifically addressing "is there a specification somewhere":

ndk-gdb is basically traditional GDB that talks to NDK applications, the GDB documentation at http://www.gnu.org/software/gdb/documentation/ is the best reference for command syntax - it's far too big a topic to cover here.

like image 74
Phil Lello Avatar answered Oct 02 '22 13:10

Phil Lello