android gdb 远程调试工具,gdb输入/输出错误,远程调试到Android

我正在尝试调试一个调用本机代码来进行GL渲染的android应用。本机代码是我要移植的现有代码(我不太了解)。我已经正确地编译,链接和安装了现有代码,并且有一些本机函数可以从我的Java代码正确调用该代码。我遇到了要跟踪的段错误,让gdb在程序中设置断点时遇到了一些问题。这是在使用Cygwin的Windows XP上进行的-我可能应该提到我仍在学习gdb。

在模拟器中启动应用程序。

在cmd提示中:

> adb forward tcp:1234 tcp:1234

> adb shell

# gdbserver localhost:1234 --attach 2120

gdbserver localhost:1234 --attach 2120

Attached; pid = 2120

Listening on port 1234

在cygwin外壳中:

arm-eabi-4.2.1/bin/arm-eabi-gdb.exe out/apps/app-android/libDM.so

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB. Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-cygwin --target=arm-elf-linux"...

(gdb) target remote localhost:1234

Remote debugging using localhost:1234

warning: shared library handler failed to enable breakpoint

0xafe0da04 in AppRefCounted::unref () at ../../stlport/stl/_iosfwd.h:39

39 class basic_ostream;

Current language: auto; currently c++

(gdb) b Java_com_app_AppRenderer_onCreate

Breakpoint 1 at 0xafff1b1a: file apps/app-android/../../../app-Android/jni/DMJNI/DMInterface.cpp, line 75.

(gdb) c

Continuing.

Warning:

Cannot insert breakpoint 1.

Error accessing memory address 0xafff1b1a: Input/Output error.

因此,看起来断点设置正确,符号也可以,但是在尝试插入断点时地址可能错误。我已经从上面引用的网页中尝试了几种不同命令的变体,但是到目前为止,还没有运气。

有什么想法吗?

谢谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值