Date: Sun, 1 Jun 1997 19:59:33 +0300 (IDT) From: Eli Zaretskii To: Andrew Crabtree cc: djgpp AT delorie DOT com Subject: Re: One for the Gurus In-Reply-To: <199706011545.AA140769943@typhoon.rose.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.)