GDB——“不允许操作”当尝试定位本地主机时

发布于 2024-10-30 12:50:21 字数 844 浏览 9 评论 0原文

由于某种原因,当我尝试在 cygwin 下在 Windows 计算机上使用 GDB 时,即使从最新源代码编译它之后,它也不会让我执行以下操作:

target remote localhost:1234

相反,当我尝试这样做时,它会说:

localhost:1234: Operation not permitted.

但是,相同的命令在我的 Arch Linux VM 和 OSX 10.5.8 计算机上运行得很好。据我所知,其中使用的是旧版本的 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/>.

For some reason, when I attempt to use GDB on my windows machine under cygwin, even after compiling it from the latest source, it won't let me do a:

target remote localhost:1234

Instead, when I try that, it says:

localhost:1234: Operation not permitted.

However, the same command works just fine on my Arch Linux VM and my OSX 10.5.8 computer. Which, AFAIK, are using older versions of gdb. "i586-pc-elf-gdb -v" reports:

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/>.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

孤独岁月 2024-11-06 12:50:21

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

Try compiling your code also with the -ggdbx" option:
CFLAGS = -Wall -g -ggdb3 -O0

缱绻入梦 2024-11-06 12:50:21

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

This might sound dumb but are you certain that you have a gdbserver running on 1234?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文