Date: Tue, 15 Oct 1996 13:14:36 +0200 (IST) From: Eli Zaretskii To: Vetro Gabor <100324 DOT 3051 AT CompuServe DOT COM> Cc: djgpp mail Subject: Re: cwsdpmi error? In-Reply-To: <961015100550_100324.3051_JHF98-1@CompuServe.COM> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 15 Oct 1996, Vetro Gabor wrote: > My problem is that when I run a program under windows 3.11 that was compiled > with gcc v2, it runs OK, but if I try to run under DOS with cwsdpmi the program > fails with a SIGSEGV error(?). > > What should I do now? You should debug your program. Compile and link it with -g switch, then, when it crashes, type this from the DOS prompt while the traceback is still on the screen: symify prog where `prog' is the name of your program (without the .exe suffix). You will see the names of files and line numbers which describe the sequence of function calls that led to the crash. You should then step with a debugger through these functions and try to understand what is the bug. The way that you describe it, it seems like you dereference a null pointer or a pointer which has a garbled value. The DJGPP FAQ has more details on how to use `symify' in section 9.2. If all the above doesn't help, post the stack trace printed when your program crashes, and somebody will help you more.