GDB - 尝试定位localhost时“不允许操作”

时间:2011-04-07 04:42:10

标签: c++ windows gdb qemu

出于某种原因,当我尝试在cygwin下的Windows机器上使用GDB时,即使在从最新源编译它之后,也不会让我这样做:

target remote localhost:1234

相反,当我尝试时,它说:

localhost:1234: Operation not permitted.

然而,同样的命令在我的Arch Linux VM和我的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/>.

2 个答案:

答案 0 :(得分:0)

尝试使用-ggdbx“选项编译代码: CFLAGS = -Wall -g -ggdb3 -O0

答案 1 :(得分:0)

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