Cygwin GDB gives error 193 when trying to run a program

When I try 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).

If error 193 is equal ERROR_BAD_EXE_FORMAT.

The compiled application itself works fine, and clients connect and interact with the application. I am using cygwin 1.7 since I am using new methods getaddrinfoto configure sockets. The application was compiled using gcc 3.4.4 with the following command:

g++ -g3 server.cc

Does anyone know what I can do wrong?

+3
source share
1 answer

, . , gdb .

+7

Source: https://habr.com/ru/post/1712248/


All Articles