delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/19/16:34:30

Date: Sun, 19 May 2002 22:23:22 +0100
From: Laurynas Biveinis <lauras AT softhome DOT net>
X-Mailer: The Bat! (v1.60h) UNREG / CD5BF9353B3B7091
X-Priority: 3 (Normal)
Message-ID: <127279070542.20020519222322@softhome.net>
To: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
CC: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii), djgpp-workers AT delorie DOT com
Subject: Re: emacs under w2k
In-Reply-To: <10205192003.AA20761@clio.rice.edu>
References: <10205192003 DOT AA20761 AT clio DOT rice DOT edu>
MIME-Version: 1.0
X-OriginalArrivalTime: 19 May 2002 20:22:42.0513 (UTC) FILETIME=[EDDD1C10:01C1FF72]
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

>> Is there any way I could use gdb in that code or should I use other
>> means to see where it fails?

> I don't know of a way to debug the 16-bit PM code called from DJGPP.

> My debugging of these things was typically done under OS/2 - which did
> an excellent job of printing out everything if a failure happened.
> Since I haven't had a working OS/2 system in about 7 or 8 years ...

Oh, I guess I'll have to do debugging in printf() spirit (do not take
'printf()' literally...)

And one probably stupid question - why that code has to be 16 bit
anyway?

> I'll try to write a little test program and see if I can make a simple
> example fail under Win2K.  If so, it will be much easier to debug.  If
> not, then we know it's something special emacs does.

I had tried writing test program which calls sbrk just like emacs:
---8<---
#include <crt0.h>
#include <unistd.h>

int _crt0_startup_flags = _CRT0_FLAG_UNIX_SBRK;

int main(void)
{
        sbrk(0);
        sbrk(36);
        sbrk(118664);
        return 0;
}
---8<---

Well, it does not fail. Maybe I've missed some flag or other piece of
setup? But if I didn't, it means that it will be difficult to
construct a test case.

There must be some randomness involved here, because I can reproduce
aborts consistently only if running emacs under gdb. Also if I
recompile emacs binary w/o any source change then the place of failure
changes. In my opinion we are quite lucky that emacs has 90% chance of
failing in the same place when running from gdb :)

Laurynas


- Raw text -


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