I\'ve recently loaded the new Android dev tools, SDK 20130717 and NDK r9.
Up to now I had the previous versions, working and debugging from within Eclipse just fine o
This is the bug that was opened on the Android NDK. A work-around is to use the arm-linux-androideabi-gdb.exe
from Android NDK r8e (as described in Christos' answer), or to download a fixed file from http://code.google.com/p/mingw-and-ndk/downloads/detail?name=arm-linux-androideabi-gdb.exe.
Ok,
From what I understand, its a problem in the new r9 release, specifically in the file named
android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gdb
This executable gives the segmentation fault.
So it looks that in the distro it has not been generated correctly from the start, from the android devs themselves who uploaded it on the main android site.
I tried and re-downloaded the r9 distribution and re-installed, yet the same thing happens so it was not something accidental eg a bad unzip.
I tried the older r8e same file and it does not give the segmentation fault, it works ok.
So, I did something to get a proof of concept of what I say and took the previous version file (from r8e) and overwrite the new r9 file, then tried again to run the failing ndk-dbg and..
..IT WORKS..
Now I have a new r9 NDK but with one file from the r8e, the old arm-linux-androideabi-gdb.exe and everything works just fine!
So I guess the android devs have to re-do the compilation of the
-> android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gdb.exe
tool, properly this time.
At least I hope someone will find this useful and avoid the frustration that I had all this time.
Christos
Just for the record, the problem with gdb appears to be fixed in r9b of the NDK.
https://developer.android.com/tools/sdk/ndk/index.html
Fixed a problem with Windows 32-bit *-gdb.exe executables failing to launch. (Issue 58975)