ndk-gdb调试相关

先启动Eclipse, ant debug.程序断点在java代码中.

然后ndk-gdb, 不使用start,会提醒Another debug session running.

ndk官方文档:

--force: By default, ndk-gdb aborts if it finds that another native debugging session is running on the same device. Using --force will kill the session, and replace it with a new one. Note that the debugged program is *not* killed and will be stopped again.

--start: By default, ndk-gdb will try to attach to an existing running instance of your application on the target device. You can use --start to explicitly launch your application before the debugging session.

 

当时没注意,debugging session和instance of application.

ant debug就是一个session,这个时候ndk-gdb也是启动一个session,使用force可以将ant debug session关闭,在ndk-gdb中break好断点, continue之后,将Eclipse直接关闭, debug session已经被强关了...去点击继续也没用了,而且各种报错,这个时候直接关闭吧..application instance 就会继续运行了.ndk-gdb中设置好的断点如果会被触发,就可以监听到的了.

 

posted on 2013-05-04 21:51  莫铭  阅读(196)  评论(0)    收藏  举报

导航