I've used ndk-gdb for shared libraries loaded in JNI context. Is it possible to use it to debug pure native executables, built with BUILD_EXECUTABLE target in Android.mk?
Asked
Active
Viewed 4,801 times
3
zer0stimulus
- 20,576
- 30
- 105
- 139
1 Answers
3
You can use gdbserver to start or attach to a process.
// Start debugger and attach to a running process
adb forward tcp:5039 tcp:5039
adb shell /system/bin/gdbserver tcp:5039 --attach PID
If you correctly configure your Eclipse environment you can debug directly from Eclipse. Below are some links I found that helped me out.
General Debugging:
http://mhandroid.wordpress.com/2011/01/25/how-cc-debugging-works-on-android/
Setting up eclipse:
http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/
Frohnzie
- 3,539
- 1
- 20
- 24