8

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

Kalen
  • 3,036
  • 8
  • 28
  • 41

3 Answers3

6

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.

Phil Lello
  • 7,879
  • 2
  • 24
  • 33
  • 3
    ok, i see.. critically it's (in project dir) "ndk-gdb --start", then the commands are referenced in that documentation you described – Kalen Apr 07 '11 at 04:58
6

There are a couple of web pages that provide instruction:

http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/

http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/#more-23

I know others have gotten this to work - but I'm stuck on the issue described here:

ndk-gdb fails with message: Invalid attribute name: package

Community
  • 1
  • 1
Scott C Wilson
  • 17,826
  • 10
  • 57
  • 80
1

Try this tutorial. It explains how to set up your eclipse environment for debugging NDK code even if this code is part of android library. (Most of the tutorial I found explain only how to setup Eclipse for debugging android application projects that have native code).

DoDo
  • 2,178
  • 1
  • 20
  • 32