Debugging Android native application using ndk-gdb

喜你入骨 提交于 2019-12-12 18:07:29

问题


I am trying to debug my android application having some native(c++) code using ndk-gdb in eclipse.It seems that by gdb server starts successfully from command line and is taking commands. But in eclipse it is showing this error : Error while obtaining file from device com.android.ddmlib.SyncException: Writing local file failed

Any one help me please.


回答1:


It seems that the framework for debugging requires an obj/local/armeabi folder.

If you open the launch file for native debugging, .metadata/.plugins/org.ecipse.debug.core/.launches/*.launch, you'll see a reference in that xml file:

<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="/projectroot/obj/local/armeabi/app_process"/>

Once I created this folder on disk this error subsided, and I was able to debug. There may be a more correct way to fix this, but I simply decided it was simple enough to create this folder.




回答2:


This question seems similar. Try some of the answers shown and see if they help.



来源:https://stackoverflow.com/questions/17317133/debugging-android-native-application-using-ndk-gdb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!