我有一个 64 位远程机器、砧和一个 32 位桌面。
我制作了一个名为 hello.c 的程序,并在 anvil 上编译它
$ gcc -ggdb -o hello hello.c
它将在铁砧上正常运行和调试。
但我想从我的桌面调试它(所以我可以通过 emacs 使用调试器)
所以 :
$gdbserver anvil:24000 hello
Process hello created; pid = 10991
Listening on port 24000
但是在桌面上,我尝试远程连接,我得到的只是奇怪的错误有一些连接的迹象:在我输入target remote anvil:24000后,另一端打印“从主机 10.17.20.149 进行远程调试”,这是我的桌面地址。
这是一个成绩单:
jla@jaspden-desktop$ gdb hello
GNU gdb (GDB) Fedora (7.2-51.fc14)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/jla/myco/chip_test/hello...done.
(gdb) target remote anvil:24000
Remote debugging using anvil:24000
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
0x0000003ed0100a80 in ?? ()
(gdb) b main
Breakpoint 1 at 0x4004b7: file hello.c, line 6.
(gdb) run
The "remote" target does not support "run". Try "help target" or "continue".
(gdb) continue
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00000000004003f6 in _start ()
(gdb)
有谁知道我做错了什么?