2011-04-07 59 views
1

由于某些原因,当我尝试在cygwin下的Windows机器上使用GDB时,即使从最新源编译它,它也不会让我做:GDB - 试图以localhost为目标时“不允许操作”

target remote localhost:1234 

相反,当我尝试,它说:

localhost:1234: Operation not permitted. 

然而,同样的命令工作得很好我的Arch Linux的虚拟机,我的OSX 10.5.8的电脑。其中,AFAIK正在使用旧版本的gdb。 “i586的-PC-ELF-GDB -v” 报道:

GNU gdb (GDB) 7.2 
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 "--host=i686-pc-cygwin --target=i586-pc-elf". 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>. 
+1

防火墙,也许? – 2011-04-07 04:44:38

+0

它不会是一个防火墙,因为它连接到本地主机,并且我没有防火墙运行该块端口1234 。 – Eli 2011-04-07 23:19:22

+0

这不会是错误信息。 – 2011-05-03 22:17:34

回答

0

尝试编译代码也与-ggdbx”选项: CFLAGS = -Wall -g -ggdb3 -O0

+0

这将无济于事,它根本不会连接到服务器。 linux主机连接精细和源代码级别的调试工作。 – Eli 2011-05-04 03:28:41

0

这听起来愚蠢的,但你确定你有一个gdbserver运行在1234?

+0

是的,GDB服务器是QEMU,默认情况下它将端口设置为1234,并且每次尝试时都会这样做。 – Eli 2011-05-04 03:27:16