gdb + cygwin

Charles Wilson cwilson@ece.gatech.edu
Sat May 22 15:33:00 GMT 1999


I'm trying to port GAA (GPL Argument Analyzer) to cygwin. After a bit of
hacking, I was able to get the program itself to compile, and run.
However, when testing with the sample code provided in the package, I'm
running into a weird problem:

Background:
    GAA takes an argument description file, and generates a .c and a .h
file to be included in your project. It's basically an easier to use
version of getopt, getoptlong.

    "gaa sample.gaa"  ---> gaaout.c, gaa.h
    Then, you compile the sample code:
    gcc -g -c gaaout.c
    gcc -g -c smain.c

I get to that step okay. Linking works, too:
    gcc -o sample gaaout.o smain.o

I get a coredump when I run the sample program:

/usr/local/src/tmp > sample
[main] F:\cygnus\cygwin-b20\usr\local\src\tmp\sample.exe 27397 (0)
handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
[main] sample 27397 (0) handle_exceptions: Dumping stack trace to
sample.exe.core

Now, this isn't all that surprising. What is surprising is that when I
run "sample.exe" within gdb, it executes fine and exits normally. What
does that mean, and how do I debug the thing if I can't reproduce the
error within the debugger?

--Chuck



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list