473,396 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

cygwin gdb always fails creating process (error 193)

I am running Windows XP with cygwin with gcc 3.4.4-1 and gdb
20060706-2. I compiled this very simple program:

#include <iostream>
using namespace std;

int main(int argc, char (*(argv[])) ) {
int max; // number to count to
if (argc == 1) {
// print to 100
max = 100;
} else {
// convert first argument to integer, print to that
max = atoi(argv[1]);
}
for (int i = 0; i <= max; i++) {
cout << i << "\n";
}
return 0;
}

....using the command:

$ g++ -g -o printNumbers.exe printNumbers.cpp

When I run `gdb printNumbers.exe`, things start off fine:

GNU gdb 6.5.50.20060706-cvs (cygwin-special)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you ar
welcome to change it and/or distribute copies of it under certain
condition
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i686-pc-cygwin"...

....but when I actually try to run the executable, I get this error:

(gdb) run
Starting program: ~/C++/exercises/printNumbers.exe
Error creating process ~/C++/exercises/printNumbers.exe, (error 193).

Error 193 is ERROR_BAD_EXE_FORMAT, but this cryptic error code does not
give me much information on how to resolve the problem. Note that
outside the debugger, both inside and outside of cygwin, the program
runs fine.

I have tried compiling the program several times using different
distributions of the g++ compiler (dev-cpp and mingw) inside and
outside of cygwin, but all with the same result. I have also tried
running gdb inside and outside of cygwin.

Running 'g++ -dumpmachine' returns "i686-pc-cygwin", so the
architectures appear to match up and should not pose a problem.

I am confounded, and not having ever used a debugger before (I hail
from PHP) doesn't help very much. Help much appreciated!

P.S. I realize debugging is not directly related to comp.lang.c++,
however, it probably is an essential part of any C++ developer's
toolkit, and also the more relevant gnu.gdb is read-only.

Dec 6 '06 #1
1 6722
ed*********@thewritingpot.com wrote:
....
>
P.S. I realize debugging is not directly related to comp.lang.c++,
however, it probably is an essential part of any C++ developer's
toolkit, and also the more relevant gnu.gdb is read-only.
Yes - you're way off topic here. This is an issue with your cygwin
installation.

FYI - I can't reproduce your problem. gdb loads the program just fine
on my installation.
Dec 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dw | last post by:
Pehaba, does anyone knows how to install MySQLdb on cygwin? - test device: MySQLdb 0.9.2.0 targz + cygwin 1.5.7-cr-0x9e + python 2.3.3 on cygwin + mysql 4.0.17 win32 - modified setup.py's...
22
by: TuPLaD | last post by:
Hello, I just made a little C++ console application: #include "iostream" using namespace std; int main () { cout << "Hello Mars !"; return 0;
4
by: goberle | last post by:
I have installed the Cygwin package under WinXP. I am trying to insure that I have a reasonable development environment, and that things are working properly, by trying to compile and run the...
4
by: Pete H | last post by:
I would like to have my new C++ projects start out with two configurations, UnicodeDebug and UnicodeRelease, instead of the standard Debug and Release configurations that Visual Studio always...
1
by: Micheal.LeVine | last post by:
I have not succeeded to build Python 2.4.2 from the source distn for Cygwin on XP (cygwin1.dll version 1005.7.0.0, Cygwin POSIX Emulation DLL). I have applied the "bandaid solution" in README, ...
0
by: nick | last post by:
Hello, I'm having troubles with ssh2_exec() agains SSH on Windows 2003. I can connect from Linux/Apache2/Php5 to a Cygwin SSH service running on Windows 2003 server. (Actually, tested with...
4
by: reachsamdurai | last post by:
Hello, Can you please let me know the procedure to reach db2 command prompt from a cygwin window (hence without using Start-> Run -> db2cmd method). I'm planning to write shell scripts which...
52
by: lcw1964 | last post by:
Greetings, all, I am trying to port a little bit of math code to gcc, that in the original version used the long double version of several functions (in particular, atanl, fabsl, and expl). I...
0
by: dot | last post by:
I spent a few headache filled days trying to use GMP on windows (XP pro) I finally got it to work and since I found little help on the Web I thought someone might find what i did useful. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.