尝试启动程序时 Cygwin GDB 给出错误 193

发布于 2024-07-26 19:21:50 字数 1026 浏览 3 评论 0原文

当我尝试在 cygwin 上使用 gdb 调试一个简单的程序时,我得到以下信息:

C:\Users\Benoit St-Pierre\workspace_cpp\cs454>gdb a.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 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-pc-cygwin"...
(gdb) start
Breakpoint 1 at 0x401a51: file server.cc, line 207.
Starting program: /cygdrive/c/Users/Benoit St-Pierre/workspace_cpp/cs454/a.exe
Error creating process /cygdrive/c/Users/Benoit St-Pierre/workspace_cpp/cs454/a.exe, (error 193).

其中错误 193 是 ERROR_BAD_EXE_FORMAT

编译后的应用程序本身运行良好,客户端与应用程序连接并交互。 我使用 cygwin 1.7,因为我使用新的 getaddrinfo 方法来设置套接字。 该应用程序是使用 gcc 3.4.4 使用以下命令编译的:

g++ -g3 server.cc

有人知道我可能做错了什么吗?

When I attempt to debug a simple program with gdb on cygwin I get the following:

C:\Users\Benoit St-Pierre\workspace_cpp\cs454>gdb a.exe
GNU gdb 6.8.0.20080328-cvs (cygwin-special)
Copyright (C) 2008 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-pc-cygwin"...
(gdb) start
Breakpoint 1 at 0x401a51: file server.cc, line 207.
Starting program: /cygdrive/c/Users/Benoit St-Pierre/workspace_cpp/cs454/a.exe
Error creating process /cygdrive/c/Users/Benoit St-Pierre/workspace_cpp/cs454/a.exe, (error 193).

Where the error 193 is a ERROR_BAD_EXE_FORMAT.

The compiled application itself runs great and clients connect and interact with the application. I'm using cygwin 1.7 since I'm using the new getaddrinfo methods for setting up sockets. The application was compiled using gcc 3.4.4 with the following command:

g++ -g3 server.cc

Anyone have a clue what I might be doing wrong?

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

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

发布评论

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

评论(1

夏见 2024-08-02 19:21:50

问题是您的路径名中有空格字符。 将文件移动到不同的目录,gdb 将能够启动该进程。

The problem is that you have space character in your path name. Move the file to a different directory and gdb will be able to start the process.

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