Mail Archives: djgpp/1996/10/15/07:33:14
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 -