www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/10/03:12:07

Date: Mon, 10 Sep 2001 09:09:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: David Witbrodt <dawitbro AT alpha DOT delta DOT edu>
cc: DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: Trouble compiling Allegro
In-Reply-To: <3B9C36C7.FAE9A19A@alpha.delta.edu>
Message-ID: <Pine.SUN.3.91.1010910090923.18194E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 9 Sep 2001, David Witbrodt wrote:

> gcc -s -o tools/dat2s.exe obj/djgpp/alleg/dat2s.o lib/djgpp/libaldat.a lib/djgpp/liballeg.a
> tools/dat2s.exe -p setup -o obj/djgpp/setupdat.s setup/setup.dat
> Exiting due to signal SIGSEGV
> Stack Fault at eip=000251ac
> eax=00000000 ebx=00157538 ecx=00000001 edx=00000067 esi=00157678
> edi=00000000
> ebp=503d1043 esp=001572fc program=C:\DJGPP\ALLEGRO\TOOLS\DAT2S.EXE
> cs: sel=39f7  base=84008000  limit=0015ffff
> ds: sel=3a3f  base=84008000  limit=0015ffff
> es: sel=3a3f  base=84008000  limit=0015ffff
> fs: sel=39d7  base=0000e600  limit=0000ffff
> gs: sel=3a6f  base=00000000  limit=0010ffff
> ss: sel=3a3f  base=84008000  limit=0015ffff
> App stack: [00157e30..000d7e30]  Exceptn stack: [000d7d88..000d5e48]
> 
> Call frame traceback EIPs:
>   0x000251ac
> make.exe: *** [obj/djgpp/setupdat.s] Error -1

I'm going to assume that this is not a known problem (I don't use
Allegro, so I won't know).

The DJGPP FAQ list explains in section 12.2 what "Stack Fault" means
and in general how to debug such crashes.  The problem in this case is
that the value of EBP in the above register dump is indeed invalid (it
should be in the range of values shown after "App stack").

What I'd suggest to do first is to type these 3 commands one after the
other:

   gcc -o tools/dat2s.exe obj/djgpp/alleg/dat2s.o lib/djgpp/libaldat.a lib/djgpp/liballeg.a
   tools\dat2s.exe -p setup -o obj/djgpp/setupdat.s setup/setup.dat
   symify tools/dat2s.exe

The first line is the same command Make invoked to build dat2s.exe,
but without the -s switch (to prevent GCC from stripping debug info
needed for SYMIFY).  The second command invokes dat2s, but uses a
backslash (because Windows shell doesn't grok forward slashes).  The
3rd command invokes the SYMIFY utility which will translate the value
of EIP, 0x000251ac, into a file name and line number.  This is the
point where the program crashed; you should look at that line closely
and try to understand what went wrong there.

Section 12.2 of the FAQ has more advice, so please read it.

- Raw text -


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