Subject: Re: wanted: gdb that disassembles 16-bit code, and/or equivalent
To: John Kohl <jtk@atria.com>
From: Theodore Ts'o <tytso@mit.edu>
List: port-i386
Date: 03/15/1995 18:05:28
   Date: Wed, 15 Mar 1995 13:42:04 -0500
   From: John Kohl <jtk@atria.com>

   I'm hacking on dosemu/NetBSD, and I would very much like to be able to
   disassemble 80x86 code that assumes it's in a 16-bit segment.  gdb
   appears to always assume a 32-bit segment when interpreting instructions.
   This especially matters for things that use immediate constants whose
   size is a function of the default operand size.

   Is there a way to coerce gdb into 16-bit disassembly mode?  Is there
   some other tool I could use?  (I'd prefer teaching gdb, since that would
   let me do live debugging rather than post-mortems).

I could be wrong, but I vaguely remember someone in working with dosemu
had patches which tortured gdb enough so that it would handle 16-bit
segments.  Or it have been someone working with Wine; it was a while ago
that I saw this, and my memory isn't clear.  You might ask the Dosemu
people (linux-msdos@vger.rutgers.edu) or the Wine people
(comp.emulators.ms-windows.wine) to see if this rings any bells.

						- Ted