android NDK开发中,用Cygwin调试本地代码时报错“Another debug session running,Use --force to kill it”原因及解决办法

     在使用ndk-gdb调试的时候,执行$NDK/ndk-gdb --verbose报错“Another debug session running,Use --force to kill it”。

     我查了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.

       在默认情况下,NDK调试会打开ant debug这个session,但是ndk-gdb也是启动一个session,所以会发生冲突。使用force将ant debug session关闭就可以了。

      我执行$NDK/ndk-gdb --verbose --force命令就没报这个错误了。

     

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。