Subject: Re: wanted: gdb that disassembles 16-bit code, and/or equivalent
To: John Kohl <email@example.com>
From: Theodore Ts'o <firstname.lastname@example.org>
Date: 03/15/1995 18:05:28
Date: Wed, 15 Mar 1995 13:42:04 -0500
From: John Kohl <email@example.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 (firstname.lastname@example.org) or the Wine people
(comp.emulators.ms-windows.wine) to see if this rings any bells.