delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/15/07:33:14

Date: Tue, 15 Oct 1996 13:14:36 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vetro Gabor <100324 DOT 3051 AT CompuServe DOT COM>
Cc: djgpp mail <djgpp AT delorie DOT com>
Subject: Re: cwsdpmi error?
In-Reply-To: <961015100550_100324.3051_JHF98-1@CompuServe.COM>
Message-Id: <Pine.SUN.3.91.961015130903.19845C-100000@is>
Mime-Version: 1.0

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.

- Raw text -


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