Debugging Android NDK C/C++ code in Eclipse - breakpoints are not hit

后端 未结 6 644
遥遥无期
遥遥无期 2020-12-01 14:59

I downloaded Android SDK Bundle for Linux and Android NDK. ADT was installed, I installed CDT.

I created a Android project and added native support (jni). Then I wro

6条回答
  •  时光说笑
    2020-12-01 15:41

    Your app executes the JNI function very early, so that the debugger is not ready yet. Unfortunately, it takes a while for gdb to establish the remote connection, see http://visualgdb.com/documentation/appstartup

    Instead of fighting the windmills, add a button to your activity, and call the same native method onClick() of that button - it will be easier to catch the breakpoint.

    BTW, the warning about 95 libraries is perfectly normal. These are the system libraries which you don't want to debug, and don't have sources for.

提交回复
热议问题