Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 1998 21:42:37 -0600
From:      Jonathan Lemon <jlemon@americantv.com>
To:        The Hermit Hacker <scrappy@hub.org>
Cc:        emulation@FreeBSD.ORG
Subject:   Re: wine 980215
Message-ID:  <19980215214237.05002@right.PCS>
In-Reply-To: <Pine.BSF.3.96.980215230351.261n-100000@thelab.hub.org>; from The Hermit Hacker on Feb 02, 1998 at 11:05:09PM -0400
References:  <Pine.BSF.3.96.980215230351.261n-100000@thelab.hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 02, 1998 at 11:05:09PM -0400, The Hermit Hacker wrote:
> 
> This problem seems to be unresolved for the last several releases...I know
> nothing at all about assembly, and wouldn't even know where to start,
> so...does anyone know of a fix for this? :(
> 
> #0  0x162835 in NtCurrentTeb () at ./sysdeps.c:139
> 139         __asm__( ".byte 0x64\n\tmovl (%1),%0"
> (gdb) list
> 134         GET_FS( fs );
> 135         if (!fs) return NULL;
> 136         GET_DS( ds );
> 137         if (fs == ds) return NULL; /* FIXME: should be an assert */
> 138         /* Get the TEB self-pointer */
> 139         __asm__( ".byte 0x64\n\tmovl (%1),%0"
> 140                  : "=r" (teb) : "r" (&((TEB *)0)->self) );
> 141         return teb;
> 142     #else
> 143         if (!pCurrentThread) return NULL;

The 0x64 is an override prefix for the aseembly instruction, telling it to
compute the displacement from the contents of the FS register.  (That is,
if I understand this right)

EG: in `C', the statement would roughly be:   teb = fs->self

Quick guess: FS contains garbage at the point where the ASM instruction
is being executed.  I haven't looked at wine, so I really don't know what
it is doing.  You'll probably want a register dump to check this - and 
pass the information to the wine developers.
--
Jonathan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980215214237.05002>