我试图在64位Ubuntu系统上调试32位可执行文件.它本身在命令行中运行良好,但是当我尝试使用gdb时,它挂在ld-linux.so.2中。此外,gdb适用于可执行文件的64位版本。有人知道我该试试什么吗?
我刚刚将一台机器重新映射到Ubuntu18.04.3,并安装了gcc和g++的多库版本。
提前谢谢。
gdb <executable>
GNU gdb ...
This GDB was configured as "x86_64-linux-gnu"
...
Reading symbols from <executable>...done.
(gdb) show archi
The target architecture is set automatically (currently i386)
(gdb) break main
Breakpoint 1 at ...
(gdb) run
Starting program...
warning: Breakpoint address adjusted from 0xf7fd9be0 to 0xfffffffff7fd9be0.
...
(7 of these)
[hangs...]
[In another terminal, ran 'kill -CONT <pid>']
Program received signal SIGCONT, Continued.
0xf7fd9be0 in ?? () from /lib/ld-linux.so.2
(gdb) cont
[hangs again...]发布于 2019-10-16 07:34:39
更新:已修复了Ubuntu8.1-0ubuntu3.2版本中的Ubuntu问题,因此,目前只需升级您的软件包(sudo apt update && sudo apt upgrade)就可以了。
原始答案:
@EmployedRussian在his edit to the question中的建议
通过将gdb=8.1-0ubuntu3.1降级为gdb=8.1-0ubuntu3,调试器再次为我工作。
这在Ubuntu18.04.3上也适用于我。您应该发出以下命令:
sudo apt install gdb=8.1-0ubuntu3 # downgrade GDB to the working version
sudo apt-mark hold gdb # prevent upgrading (until the repository version is fixed)我为Ubuntu:https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1848200创建了一个bug报告
如果您有一个Ubuntu帐户,您可以单击Does this bug affect you?,以便尽早修复它。
发布于 2019-10-04 23:18:35
可能是这个gdb错误:https://sourceware.org/bugzilla/show_bug.cgi?id=23210
尝试升级到当前的GDB版本(8.3.1)。如果Ubuntu没有提供相应的包,您可以自己编译它。
发布于 2019-11-08 16:37:22
这一点现在已在8.1-0ubuntu3.2的仿生更新:https://launchpad.net/ubuntu/+source/gdb/8.1-0ubuntu3.2中得到修正。
https://stackoverflow.com/questions/58225562
复制相似问题