0

The NDK r11 that was just released.
release notes state: Removed ndk-gdb in favor of ndk-gdb.py

However there doesn't appear to be any gdb tools anywhere in the r11 NDK package. What am I missing. Is this now a separate tool that has to be tied in some how? Was it a gross oversight by the NDK gods? I peaked at my old ndk r10e and there is indeed both ndk-gdb and ndk-gdb.py so I know the python script at least existed there. Are these items I can port over from my R10e version. I know the ndk-gdb script was always breaking on me with some periodic tweaks needed. I've never used the python script so I guess really my question is two fold.

Where do I get/install/configure ndk-gdb.py and how do I use it. Is it vastly different than the old ndk-gdb shell script.

Any insight or help is greatly appreciated.

rabidcat
  • 45
  • 6

2 Answers2

1

Update to the latest NDK r11b release, a bug related to ndk-gdb.py was fixed in that version: https://github.com/android-ndk/ndk/issues/3

khaledev
  • 496
  • 4
  • 6
0

I'm not totally sure about ndk-gdb vs ndk-gdb.py, but if you look in <NDK>/prebuilt/darwin-x86_64/bin (or replace darwin-x86_64 with your platform's name), you'll find ndk-gdb and some other tools (ndk-depends and ndk-stack). I haven't tried using them myself though, so I don't know if their behaviour has changed compared to r10e.

mstorsjo
  • 12,983
  • 2
  • 39
  • 62
  • well, that isn't a place I would have looked. I thought I searched everything. sorry for the sloppy grep on my part. Let me check it out. Thanks so much. – rabidcat Mar 16 '16 at 20:17
  • After inspection this answer correctly part 1 of my question. The second part "Configure" is still a bit of a mystery. More data; I'm running on mac os. What was` ndk-gdb (.sh)` is now just a one liner pointing to `ndk-gdb.py`. precisely `$(dirname $(readlink -f $0))/ndk-gdb.py $@` where readlink breaks. I think I found a fix for that installing brew coreutils and using greadlink instead. however now it is getting mangled up not finding the gdbrunner from the import statement. located in python-packages. I'm out of my element chasing these paths and still seeking advise. Thanks – rabidcat Mar 16 '16 at 21:45
  • Try doing `export PYTHONPATH=/python-packages` first, and add a symlink from `/prebuilt/host-tools` to `/prebuilt/darwin-x86_64` (`cd /prebuilt; ln -s darwin-x86_64 host-tools`) - then I get to the point that it asks me to connect a device, at least. – mstorsjo Mar 17 '16 at 13:57
  • Thank you. much closer. clear signs of life with those changes. The cmd line with python for gdb is completely different than the old shell script. The chatter is indicating it found the package, and adb version and correct device. It complaining `No such file` and `No rule for target` for the `/prebuilt/build/core/build-local.mk` with a final `Failed to retrieve application ABI from Andorid.mk`. I'm wondering do I need to reconfigure the make files or something. normally the ABI target is in the Application.mk. Can't find any documentation on ndk-gdb.py usage – rabidcat Mar 17 '16 at 16:39