473,788 Members | 3,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ex e printNumbers.cp p

When I run `gdb printNumbers.ex e`, 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.ex e
Error creating process ~/C++/exercises/printNumbers.ex e, (error 193).

Error 193 is ERROR_BAD_EXE_F ORMAT, 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 6760
ed*********@the writingpot.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
2338
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 using thread library.. NO, library + include
22
2222
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
13373
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 following classic program. $ cat hellow.cpp #include <iostream> int main (int argc, char *argv) { cout << "Hello, world" << endl;
4
2544
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 creates. Is there a way to configure Visual Studio to do this Thanks in advance - Pete H
1
1822
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, ../configure --with-threads=no and edited the resulting Modules/Setup file for SSL.
0
1619
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 the same Cygwin configuration on multiple Windows 2003 servers) Each first time that I use ssh2_exec() it works fine. I can read from
4
14064
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 accesses DB2 database on windows platform hence I installed cygwin but I'm unable to connect to database as it fails with the error message. $ db2 DB21061E Command line environment not initialized.
52
6005
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 get a complie-time "unidentified reference" error to the expl() calls, but gcc seems to digest atanl and fabsl just fine. Changing expl to exp cures the compile time problem, but I get at best double precision in the final results. I am assuming...
0
3309
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. Creating an environment suitable for GMP programming. 1) Create 'cygwin' environment (see below) 2)add GMP to the cygwin directory (see below)
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.