gdb + cygwin
Mon May 24 09:57:00 GMT 1999
--- Charles Wilson <firstname.lastname@example.org> wrote:
> 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:
> 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
> 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?
I've seen this when I have a pointer reference that isn't being referenced
correctly. Perhaps a prototype is incorrect or not specified. Perhaps you
have a pointer becoming an integer or an integer becoming a pointer, either way
you're in trouble.
Use the -Wall switch on the compilation and don't ignore the warnings. If it
has to do with a pointer, it's an ERROR not a WARNING.
"Earnie Boyd" < mailto:email@example.com >
CYGWIN RELATED HELP:
DOCUMENTATION: < http://sourceware.cygnus.com/cygwin/docs.html >
DLLHELP: < http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ >
ARCHIVE SEARCH: < http://www.delorie.com/archives/ > OR
< http://www.eGroups.com/list/gnu-win32/ >
Do You Yahoo!?
Free instant messaging and more at http://messenger.yahoo.com
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org
More information about the Cygwin