delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/24/12:58:34

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <19990524170118.23881.rocketmail@web114.yahoomail.com>
Date: Mon, 24 May 1999 10:01:18 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: earnie_boyd AT yahoo DOT com
Subject: Re: gdb + cygwin
To: Charles Wilson <cwilson AT ece DOT gatech DOT edu>, cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0

--- Charles Wilson <cwilson AT ece DOT gatech DOT edu> 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:
> 
> 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?

Hi Chuck,

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:earnie_boyd AT yahoo DOT 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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019