GDBSERVER奇怪的错误,而调试本机应用程序 [英] Gdbserver strange error while debugging native app

查看:821
本文介绍了GDBSERVER奇怪的错误,而调试本机应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图调试我的Andr​​oid设备上的本机应用程序。
我跟着这个教程:的http://blog.thecobraden.com/2012/02/debugging-apps-with-native-$c$c-part-1_09.html
,一切都很好,我建立应用程序并安装它,一旦我想用NDK-GDB调试它,我得到这个错误:无法打开远程设备:无效的参数

I'm trying to debug an native app on my android device. I followed this tutorial: http://blog.thecobraden.com/2012/02/debugging-apps-with-native-code-part-1_09.html And everything went good, I built the app and installed it, once I wanted to debug it with ndk-gdb I got this error: Could not open remote device: Invalid argument.

我搜索这个错误,发现这个答案:<一href=\"http://stackoverflow.com/questions/15938848/android-ndk-debugging-device-cant-be-opened\">Android NDK调试:设备无法打开这是非常相似,我的问题,这个方法我试过,现在我得到这个错误:无法打开插座:权限被拒绝

I searched this error and found this answer: Android NDK debugging: device can't be opened It's very similar to my problem, I tried this method and now I get this error: Can't open socket: Permission denied.

我的手机扎根,所以我不明白为什么gdbserver的无法打开插座。我试图给gdbserver的二进制不同的权限,但它仍然是行不通的。
任何解决方案?

My phone is rooted so I don't understand why gdbserver can't open the socket.. I tried to give the gdbserver binary different permissions but it still won't work. Any solutions?

推荐答案

您在运行NDK GDB命令根源?亚行做根来获得设备的root访问权限,然后启动调试。希望这会有所帮助。

Are you running the ndk gdb command as root? Do adb root to get the root access of the device and then start the debugging. Hopefully this should help.

这篇关于GDBSERVER奇怪的错误,而调试本机应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆