4
votes

The NDK (Android Native development Kit) for ARM comes with a gcc and GNU utils toolchain, including an elderly GDB. However, the GDB seems unable to show the contents of registers in the VFP or NEON SIMD extensions - that is, in debugging a program using NEON/VFP instructions, only a subset of registers are visible. I believe a newer version of GDB is required to gain this ability. The hardware in use supports NEON.

Is it true I need a newer gdb, and the as shipped GDB in Googles NDK cannot do this?

Is there a pre-built GDB for debugging VFP/NEON code on ARM Android devices or a procedure to produce an NDK toolchain with an up to date GDB included that can do this? (for a Windows/Linux 64bit host)

2
launchpad.net/gdb-linaro sounds like there are alternatives. Or get yourself a tegra2 based device :)zapl
I think zapl was just joking. @OP: Please be more explicit if you want an answer.Jake 'Alquimista' LEE

2 Answers

3
votes

Android NDK (checked on r8) comes with an old gdb and gdbserver (v6.6) that does not support NEON. To use it, you can build either build it from the gdb sources and Android patches, or get a pre-built one:

  1. Download the prebuilt gdb 7.4.1 for Android archive
  2. Open (NDK)\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin directory
  3. Rename arm-linux-androideabi-gdb.exe to arm-linux-androideabi-gdb-OLD.exe
  4. Copy the new gdb.exe to the current folder.
  5. Open the (NDK)\toolchains\arm-linux-androideabi-4.4.3\prebuilt directory.
  6. Rename gdbserver file to gdbserver_old
  7. Copy the new gdbserver to the current folder
2
votes

It appears the NDK GDB as shipped cannot show NEON registers. This link on the ARM developer site implies such, stating the gdbserver shipped in the DS5 suite adds this ability.

The gdbserver provided in DS-5 is based on a newer version of GNU's gdbserver and provides additional multi-threading capabilities, access to ARM NEON registers (when available), and improved stability