delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/07/25/17:26:07

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Mon, 26 Jul 2004 00:24:06 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <3405-Mon26Jul2004002405+0300-eliz@gnu.org>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <20040725013214.18573.00000172@mb-m22.aol.com> (sterten@aol.com)
Subject: Re: strange error
References: <2914-Sat24Jul2004104537+0300-eliz AT gnu DOT org> <20040725013214 DOT 18573 DOT 00000172 AT mb-m22 DOT aol DOT com>
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

> From: sterten AT aol DOT com (Sterten)
> Newsgroups: comp.os.msdos.djgpp
> Date: 25 Jul 2004 05:32:14 GMT
> 
>  >>  >Bottom line, using the debugger in such cases might need some hard
>  >>  >work, but it is always the shortest way to the solution, because it
>  >>  >saves you the need to guess.
> 
> ..which is sometimes the shorter way to the solution

In my experience, guessing is _never_ a shorter way.

> 0x1cfc <main+1660>:	movl   $0x0,(%eax,%ebx,4)

This is the instrcution that crashes.  It can crash if either EAX or
EDX have bad values.

This part of the crash message:

> eax=0000d270 ebx=a00f0706 ecx=00000099 edx=5ff0f90b esi=a00f067e edi=ffffff78  

clearly shows that EAX is okay (less than the segment limit
0x0009ffff), but EBX is not.

We need to know what source line produced the above instruction, and
what variables are in the EAX and EBX registers.

For the former, the GDB command

  (gdb) info line *0x1cfc

will print the source line number that produced that instruction.

> now, I think, I needn't do the assembly listing with GCC.

You don't need that, but please do use the GDB command above, rather
than guess (again) what is the line that crashed.

> The order of where the arrays are stored could have been affected by
> the small changes which changes the crashing behaviour.

It shouldn't have been.

> Or maybe indices were read from the code-area.

That simply cannot happen in DJGPP.

Let's not guess, but instead stick to the ``slower'' way, shall we?

- Raw text -


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