delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/07/21:25:35

From: Edward_hill <ha AT nochance DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What about the registers????
Date: Mon, 07 Jun 1999 13:55:05 +0100
Organization: GEC-Marconi
Lines: 39
Message-ID: <375BC129.B050BC52@nochance.com>
References: <7jg9v2$l6l$1 AT nnrp1 DOT deja DOT com>
NNTP-Posting-Host: pc02372.gmsws.gecm.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.51 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

north AT iname DOT com wrote:
: 
: My program crashes due to a GPF.
: Can somebody please explain what one can read out from all
: the regiser results as shown below
: 
: eax, ebx, esi ,es, ds????????????
: -----------
: Exiting due to signal SIGSEGV
: General Protection Fault at eip=00001016
: eax=e20000e4 ebx=000001ee ecx=00000000 edx=00000003 esi=00004284
: edi=00091fc8
: ebp=007b00a1 esp=0008f88f program=C:\DJGPP\USER\DATABAS\DBASE3.EXE
: cs: sel=01cf  base=01ee0000  limit=000affff
: ds: sel=01d7  base=01ee0000  limit=000affff
: es: sel=01d7  base=01ee0000  limit=000affff
: fs: sel=019f  base=00006720  limit=0000ffff
: gs: sel=01df  base=00000000  limit=0010ffff
: ss: sel=01d7  base=01ee0000  limit=000affff
: App stack: [000934f4..000134f4]  Exceptn stack: [000133d8..00011498]

Well loosly translated DBASE3.EXE wanders about in memory and
does a little damage. Look at line 56 you should have < instead
of <=... or more seriously

The information will generally be of little use to you.
Fristly recompile with -Wall and secondly this error
shows that you have perfectly legal code it just
does something nasty to memory, check for 
array bounds, uninitialised variables, pointers
pointing to the wrong place over-running linked lists
and anywhere your program uses memory.

Or step through with a debugger.
Or have sequence points in your program that either
output messages or prompt for a keypress to 
discover the location of the bug.

Ed

- Raw text -


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