gdbserver静态编译-调试失败的原来

打算调试,zyote。众所周知,android的lib不是glibc.所以要个静态编译的gdbserver.

./configure --help

CFLAGS=-static ./configure --host=arm-none-linux-gnueabi
然后make当前目录下就gdbserver出来了。readelf -d结果为静态文件。

 

用自己编译的gdbserver+arm-none-linux-gnueabi-gdb调度时。follow-fork-mode和detach-on-fork死都不管用. info inferiors只显示一个进程。

 

人品很好,在下面的地方找到了答案。(http://code.google.com/p/android/issues/detail?id=15894)

The 'gdbserver' that comes in NDK r5b is stripped of symbols, so I cannot confirm that what I'm about to say is absolutely the cause of this particular segfault, but I do have an interesting data-point to share:

Back in early February I discovered that the AOSP's prebuilt 'gdbserver' for Gingerbread had been statically linked against a libc from Cupcake.  This caused an impedance mismatch between libc and the kernel, causing segfaults.  (During this time I was un
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值