Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > cygwin gdb always fails creating process (error 193)

Reply
Thread Tools

cygwin gdb always fails creating process (error 193)

 
 
edwardzyang@thewritingpot.com
Guest
Posts: n/a
 
      12-06-2006
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.

 
Reply With Quote
 
 
 
 
Gianni Mariani
Guest
Posts: n/a
 
      12-06-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging with gdb: pystack macro for gdb to show python stack trace Timothy Madden Python 1 09-17-2009 11:47 AM
GDB - no debugging symbols found (GDB Vs GCC?) seba C++ 1 03-22-2007 02:02 PM
Capturing gdb output in pyhton script using gdb -batch -x arguments Surendra Python 0 03-23-2006 02:47 PM
confirm unsubscribe from cygwin-announce@cygwin.com cygwin-announce-help@cygwin.com Python 0 09-05-2003 01:29 AM
confirm unsubscribe from cygwin@cygwin.com cygwin-help@cygwin.com Python 0 09-04-2003 06:34 PM



Advertisments