ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/21/02:20:47

Date: Thu, 21 Dec 1995 08:49:53 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Denis P Dersarkisian <denis AT oitunix DOT oit DOT umass DOT edu>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: problem running C++ program

On Wed, 20 Dec 1995, Denis P Dersarkisian wrote:

> Hi everyone.  I've been having a problem running a C++ program that I've
> written. It compiles and links with no real problems. When I run it, though,
> I get this...
> 
> go32 test2
> go32 version 1.12.maint3 Copyright (C) 1994 DJ Delorie
> About to init vars
> done, returning...
> Segmentation violation in pointer 0x00000000 at d8:2298
> eax=00000000 ebx=00007024 ecx=7fffe710 edx=7fffe753 esi=7ffffc68 edi=00000008
> ebp=7fffe6ac esp=7fffe6a4 cs=d8 ds=48 es=48 fs=48 gs=38 ss=48 cr2=00000000
> Call frame traceback EIPs:
>   0x00002298
>   0x00001694
>   0x000024e6
> 
> The "about to init vars" and "done, returning" messages are made by printf's
> I stuck in the program to help me find where the crash was occuring.  And
> I have found approximately where the program's crashing.  My problem is I
> still have absolutely no idea WHY it's crashing here.

You can see where *exactly* your program crashes (and thus gain some 
insight on the WHY issue) by using the SYMIFY program which comes with 
DJGPP.  While the above stack trace is still on the screen, type the 
following words of wisdom from the DOS prompt:

	symify test2

SYMIFY will then print a file name and a source line number near every 
address in the stack dump, and you will then know exactly at what source 
line did the program crash.

This is described in somewhat more detail in the DJGPP FAQ list 
(available as faq102.zip from the same place you get DJGPP), section 9.5.

- Raw text -


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