delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/19/07:32:55

Date: Sun, 19 May 2002 13:30:39 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurynas Biveinis <lauras AT softhome DOT net>
cc: sandmann AT clio DOT rice DOT edu, djgpp-workers AT delorie DOT com
Subject: Re: Re[4]: emacs under w2k
In-Reply-To: <2242535597.20020519121427@softhome.net>
Message-ID: <Pine.SUN.3.91.1020519132152.17558C-100000@is>
MIME-Version: 1.0
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

On Sun, 19 May 2002, Laurynas Biveinis wrote:

> Program received signal SIGSEGV, Segmentation fault.
> 0x00001254 in dos_alloc_ok ()
> 
> (gdb) disas 0x123a 0x1254
> Dump of assembler code from 0x123a to 0x1254:
> 0x123a <dos_alloc_ok+209>:        je     0x12a8 <no_memory>
> 0x123c <dos_alloc_ok+211>:        mov    %eax,0x206510
> 0x1241 <dos_alloc_ok+216>:        mov    %eax,%edi
> 0x1243 <dos_alloc_ok+218>:        mov    %fs:0x10,%ecx
> 0x124a <dos_alloc_ok+225>:        shr    $0x2,%ecx
> 0x124d <dos_alloc_ok+228>:        xor    %esi,%esi
> 0x124f <dos_alloc_ok+230>:        push   %ds
> 0x1250 <dos_alloc_ok+231>:        push   %fs
> 0x1252 <dos_alloc_ok+233>:        pop    %ds
> 0x1253 <dos_alloc_ok+234>:        cld
> End of assembler dump.

You ended the disassembly prematurely, I think: the exception happened on 
the very next line.  Here's what follows the `cld' line:

        rep
        movsl

This copies the code of the 16-bit helper to the memory buffer we 
allocated earlier.

So both crashes are somehow related to the 16-bit helper.  It would be 
interesting to know whether the other crash indeed happens inside the 
16-bit helper or not.  See my other mail for some advice about avoiding 
false alarms.

> I am unable to set breakpoint in dos_alloc_ok, no matter if I try by
> function or by address. What's wrong here?

dos_alloc_ok is not an extern symbol, so it might be tricky.  However, 
I've just tried "break dos_alloc_ok", and it did work for me.  I didn't 
try to run Emacs with that breakpoint, though; do you mean that the 
breakpoint seems to be set, but never breaks?

As for setting a breakpoint by address, did you remember to prepend an 
asterisk to the address, like this:

	(gdb) b *0x1252

?

- Raw text -


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