gdbserver:映射共享库部分时出错 [英] gdbserver: Error while mapping shared library section

查看:50
本文介绍了gdbserver:映射共享库部分时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用gdbserver时调试时遇到问题.gdb显示加载共享库之一时出错.

I am having trouble debugging when using gdbserver. gdb shows error loading one of the shared libraries.

Error while mapping shared library sections:
`target:<path to library>': not in executable format: Invalid argument

使用PID附加gdb时没有问题.但是gdbserver抛出上述错误,然后我无法在该共享库中设置任何断点.

I have no problem when attaching with gdb using PID. But gdbserver throws the above error and then I am unable to set any breakpoints in that shared lib.

有什么主意吗?我有同一个应用程序中的其他库,似乎没有任何问题.

Any idea what could be wrong? I have other libraries from the same application that don't seem to have any problem.

我正在

Centos 6.7
gdb version 7.11.1
gcc version 4.4.7

推荐答案

我发现gdb版本7.10+的特定二进制文件存在此问题.仍然不确定为什么.在7.9上可以正常使用,因此我降级以解决此问题.

I found that gdb version 7.10+ has this problem with my particular binary. Still not sure why. This works fine with 7.9 so I downgraded to overcome this issue.

这篇关于gdbserver:映射共享库部分时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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