delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/01/13:09:42

Date: Sun, 1 Jun 1997 19:59:33 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: One for the Gurus
In-Reply-To: <199706011545.AA140769943@typhoon.rose.hp.com>
Message-ID: <Pine.SUN.3.91.970601195452.24881B-100000@is>
MIME-Version: 1.0

On Sun, 1 Jun 1997, Andrew Crabtree wrote:

> It is located in malloc (one that I haven't touched), on a line like
> follows 
> 
> movl (%edx),%eax
> 
> The crash shows it with a rediculously high edx, inside gdb
> it is much more reasonable (about 0x4000)

Very strange indeed.  But a bit of debugging there might reveal the 
reason for this.

> I still don't understand why bash works but command.com doesn't.  
> I assume (probably incorrectly) that they exec programs in the same way.

Your assumption is indeed wrong.  Since Bash is a DJGPP program, it 
invokes other DJGPP programs in a way that's a bit different than 
COMMAND.COM.  And if you called HELLO from Bash when both `hello' (raw 
COFF file) and `hello.exe' were in the current directory, Bash would 
invoke `hello', much in the same way as gdb loads the debuggee.

Another difference is that when Bash runs HELLO, you get netsed DPMI 
programs, which also changes things (selectors etc.)

- Raw text -


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