I'm trying to get the NDK debugger working but with no success so far.
To make sure my debug symbols are present and valid, I use the compiler options -O0 and -g, and the ndk-build parameter NDK_DEBUG=1.
The ndk-gdb script runs with out issues and launches GDB. When do a "sharedlibrary" command, I get this:
Symbols already loaded for /bla/bla/libMySharedLib.so
However when I try breaking execution or e.g. adding a segfault to test, I never get any of the symbols from that library in the call stack. The only symbols I've gotten are from libc, if I break execution while it's waiting for a mutex for instance. Also tried adding breakpoints with no luck. GDB lets me add the breakpoints, and the code runs fine, but the breakpoints are never triggered.
I'm using API level 8 as I need to support Android 2.2 (Froyo).
question from:
https://stackoverflow.com/questions/10534367/how-to-get-ndk-gdb-working-on-android 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…