Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

x86 Simulator

2 views
Skip to first unread message

Marc Fleischmann

unread,
May 12, 1997, 3:00:00 AM5/12/97
to

Does anybody happen to know about a x86 simulator for x86
Linux (not DOSEMU)?

We'd like to be able to trap any single load/store machine
instruction (of certain user applications) in order to
generate memory reference/access traces.

Thanks a lot for your help.

-Marc

--
Hewlett-Packard Labs | Marc Fleischmann
1501 Page-Mill Road | ma...@hpl.hp.com, (415) 857-3365
Palo Alto, CA 94303 | http://www.hpl.hp.com/personal/Marc_Fleischmann/

Veksler Michael

unread,
May 14, 1997, 3:00:00 AM5/14/97
to

Marc Fleischmann (ma...@hpl.hp.com) wrote:
: Does anybody happen to know about a x86 simulator for x86
: Linux (not DOSEMU)?

: We'd like to be able to trap any single load/store machine
: instruction (of certain user applications) in order to
: generate memory reference/access traces.

: Thanks a lot for your help.

There is an x86 simulator (probably partial), that was written for cache
performance simulation. This simulator was written with performance in mind.
I guess that it performs about 200,000 instructions/second on 486DX33.
I am not sure about that, since I run the mips simulator.
try:
ftp://ftp.cs.wisc.edu/sohi/Code/simplescalar/x86.tar.gz

I am not sure if that will be sufficient. If not, you might need to check
the contents of the directory:
ftp://ftp.cs.wisc.edu/sohi/Code/simplescalar/

I am not sure what the exact licensing is. The mips simulator I have is
free (at least) for research.

Michael

Roger Espel Llima

unread,
May 15, 1997, 3:00:00 AM5/15/97
to

In article <3377AB...@hpl.hp.com>,

Marc Fleischmann <ma...@hpl.hp.com> wrote:
>Does anybody happen to know about a x86 simulator for x86
>Linux (not DOSEMU)?
>
>We'd like to be able to trap any single load/store machine
>instruction (of certain user applications) in order to
>generate memory reference/access traces.
>
>Thanks a lot for your help.

There's something called pcemu that completely emulates a 8086. It's in
C, and should be portable to any reasonable Unix with X. FreeBSD uses
it (they don't have a dosemu-equivalent). It doesn't do graphics or
protected mode, though.


Roger
--
e-mail: es...@llaic.univ-bpclermont.fr, es...@unix.bigots.org
WWW page & PGP key: http://www.eleves.ens.fr:8080/home/espel/index.html

Kai Schuetz

unread,
May 16, 1997, 3:00:00 AM5/16/97
to

Roger Espel Llima wrote:
>
> In article <3377AB...@hpl.hp.com>,
> Marc Fleischmann <ma...@hpl.hp.com> wrote:
> >Does anybody happen to know about a x86 simulator for x86
> >Linux (not DOSEMU)?
> >
> >We'd like to be able to trap any single load/store machine
> >instruction (of certain user applications) in order to
> >generate memory reference/access traces.
> >
> >Thanks a lot for your help.

What you are looking for is "bochs", which I saw running Windows 3.11 on
a SGI (mips processor). A also heard it's now able to run Win95, which
I quite can't believe. I'm sorry I have got no URL or something, but
I'm shure you'll find bochs anyway.

--
|/
|\ai

--------------------------------------------------------------------------------
Kai Schuetz
mailto:ka...@i6.informatik.rwth-aachen.de
Hi, I'm not a signature virus. Why don't you just copy me into your
signature?
--------------------------------------------------------------------------------

Paul David Fox

unread,
May 20, 1997, 3:00:00 AM5/20/97
to

Christian D. Smith wrote:
>
> In article <3377AB...@hpl.hp.com>,
> Marc Fleischmann <ma...@hpl.hp.com> writes:
> >Does anybody happen to know about a x86 simulator for x86
> >Linux (not DOSEMU)?
> >
> >We'd like to be able to trap any single load/store machine
> >instruction (of certain user applications) in order to
> >generate memory reference/access traces.
> >
> >Thanks a lot for your help.

I'm presently working on one at the moment. Give me an email
in a couple of weeks if you can wait that long.

I'd be personally interested to know more about what you are
after.

Mail me at the home address below (cut out the NO_SPAM_'s.

______________________________________________________________________
| Paul David Fox Lehman Brothers. |
| Consulant E-mail: NOSPAM_pfox@NOSPAM_lehman.com |
| #### Sold! ########### Home: NOSPAM_fox@NOSPAM_crisp.demon.co.uk |
| ###################### Tel: +44 171 601 0011 x6025 |
This message is

Gilbert Ramirez Jr.

unread,
May 20, 1997, 3:00:00 AM5/20/97
to

Paul David Fox (pfoxS...@lehman.com) wrote:
> Christian D. Smith wrote:
> >
> > In article <3377AB...@hpl.hp.com>,
> > Marc Fleischmann <ma...@hpl.hp.com> writes:
> > >Does anybody happen to know about a x86 simulator for x86
> > >Linux (not DOSEMU)?
> > >
> > >We'd like to be able to trap any single load/store machine
> > >instruction (of certain user applications) in order to
> > >generate memory reference/access traces.
> > >

> I'm presently working on one at the moment. Give me an email


> in a couple of weeks if you can wait that long.

> I'd be personally interested to know more about what you are
> after.

An 8086-emulator with 'breakpoints' would be a great tool for debugging
and/or disassembling DOS programs. I find myself in need of the latter...
have the emulator pause the "8086" when program-flow reaches a certain
instruction. :-)

--gilbert
--
_______________________________________________________________________
Gilbert Ramirez Jr. gr...@merece.uthscsa.edu
University of Texas http://merece.uthscsa.edu/gram/
Health Science Center at San Antonio University Health System

Paul David Fox

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

Gilbert Ramirez Jr. wrote:
>
> An 8086-emulator with 'breakpoints' would be a great tool for debugging
> and/or disassembling DOS programs. I find myself in need of the latter...
> have the emulator pause the "8086" when program-flow reaches a certain
> instruction. :-)

I'm working on a 386 emulator so I can x86 Unix binaries on my...err...
Unix machine and in parallel run Windows binaries on my Windows machine!

It includes at present a minimal debugger (single step, trace and
various other things to allow me to get it going). Breakpoints
are high on my list, but pure 8086 is not.

Why do you want 8086 mode - for embedded systems?

Gilbert Ramirez Jr.

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

Paul David Fox (pfoxS...@lehman.com) wrote:
> Gilbert Ramirez Jr. wrote:
> >
> It includes at present a minimal debugger (single step, trace and
> various other things to allow me to get it going). Breakpoints
> are high on my list, but pure 8086 is not.

> Why do you want 8086 mode - for embedded systems?

My fault... I was too hasty in my typing. I meant 8088.

Gilbert Ramirez Jr.

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

Paul David Fox (pfoxS...@lehman.com) wrote:

> I'm working on a 386 emulator so I can x86 Unix binaries on my...err...
> Unix machine and in parallel run Windows binaries on my Windows machine!

I can understand the Unix on Unix... but Windows on Windows? Just to
satisfy my curiousity, please explain! :)

And to follow up on what *I'd* like to do with it... I have a DOS
device driver that I'm disassembling at the moment. It's 8088-code. I
would love to be able to let it run until it reaches a certain point,
then examine its memory structures while stepping through the program.
I guess I could just modify the device driver, cause it to exit
prematurely, then examine it with one of the free DOS-memory viewers
available on SimTel or garbo. But I'd really like to do all the
disassembling from within Unix.

David Sugar

unread,
May 23, 1997, 3:00:00 AM5/23/97
to


Gilbert Ramirez Jr. <gr...@merece.uthscsa.edu> wrote in article
<5lt2es$4m3$1...@cosmos.uthscsa.edu>...


> Paul David Fox (pfoxS...@lehman.com) wrote:

> > Christian D. Smith wrote:
> > >
> > > In article <3377AB...@hpl.hp.com>,
> > > Marc Fleischmann <ma...@hpl.hp.com> writes:
> > > >Does anybody happen to know about a x86 simulator for x86
> > > >Linux (not DOSEMU)?
> > > >
> > > >We'd like to be able to trap any single load/store machine
> > > >instruction (of certain user applications) in order to
> > > >generate memory reference/access traces.
> > > >
>
> > I'm presently working on one at the moment. Give me an email
> > in a couple of weeks if you can wait that long.
>
> > I'd be personally interested to know more about what you are
> > after.
>

> An 8086-emulator with 'breakpoints' would be a great tool for debugging
> and/or disassembling DOS programs. I find myself in need of the latter...
> have the emulator pause the "8086" when program-flow reaches a certain
> instruction. :-)
>

> --gilbert
>
The power of a simulator comes not just in instruction breakpoints, but in
'rule' based breakpoints. For example, 'break' when the value of the
memory location containing 'x' is > 32.


David Schmidt

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

"David Sugar" <dy...@tycho.com> wrote:
>
>
>Gilbert Ramirez Jr. <gr...@merece.uthscsa.edu> wrote in article
><5lt2es$4m3$1...@cosmos.uthscsa.edu>...
>> Paul David Fox (pfoxS...@lehman.com) wrote:
>> > Christian D. Smith wrote:
>> > >
>> > > In article <3377AB...@hpl.hp.com>,
>> > > Marc Fleischmann <ma...@hpl.hp.com> writes:
>> > > >Does anybody happen to know about a x86 simulator for x86
>> > > >Linux (not DOSEMU)?
>> > > >
>> > > >We'd like to be able to trap any single load/store machine
>> > > >instruction (of certain user applications) in order to
>> > > >generate memory reference/access traces.
>> > > >
[snipped part to get past 'more included text NNTP message]

>> An 8086-emulator with 'breakpoints' would be a great tool for debugging
>> and/or disassembling DOS programs. I find myself in need of the latter...
>> have the emulator pause the "8086" when program-flow reaches a certain
>> instruction. :-)
>>
>> --gilbert
>>
>The power of a simulator comes not just in instruction breakpoints, but in
>'rule' based breakpoints. For example, 'break' when the value of the
>memory location containing 'x' is > 32.
>
But on a '386 and above, shouldn't you be able to do this without the overhead
of a full emulator? Some modern commercial DOS debuggers allow you to set
"watchpoints," where anytime a particular variable is written you 'break.' I
believe they use the memory-management functions to set the variable read-only,
then intercept the trap to implement this. Once you are in the trap handler,
it's easy enough to check what stored for being < or > some value, then either
'break' or resume.

This won't catch DMA or some ISR's setting the variable, but I doubt for most
people that would be a serious concern--if so, you could always trap DMA chip
port accesses and interrupts as well.

Just my 0.02 worth

David S.


Horst von Brand

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

gr...@merece.uthscsa.edu (Gilbert Ramirez Jr.) writes:
> Paul David Fox (pfoxS...@lehman.com) wrote:
> > Why do you want 8086 mode - for embedded systems?

> My fault... I was too hasty in my typing. I meant 8088.

Exactly the same thing...
--
Dr. Horst H. von Brand mailto:vonb...@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

Lennart Benschop

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <5miq1b$p...@cicsun.univ-bpclermont.fr>,
Roger Espel Llima <es...@llaic.univ-bpclermont.fr> wrote:
>Look around for 'pcemu', it does just that. Runs in an X window with a
>VGA font, emulates a 8086 at the instruction level, and has support for
>debugging. You need a copy of msdos or some 8086-compatible OS to boot
>it.

Pcemu also runs Caldera Open DOS (free for noncommercial use!) and even
Freedos, though the latter does not work with the 'Network drive redirector'
to make a Unix file system tree accessible as a C drive.

In a way pcemu (though being slow) is more stable than dosemu, at least on
my machine. I know it's my fault that I haven't yet upgraded to the latest
versions of both the kernel and dosemu.

Pcemu can be made to work on an Alpha, dosemu can't.

--
Lennart

Roger Espel Llima

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <5lt2es$4m3$1...@cosmos.uthscsa.edu>,

Gilbert Ramirez Jr. <gr...@merece.uthscsa.edu> wrote:
| Paul David Fox (pfoxS...@lehman.com) wrote:
| > Christian D. Smith wrote:
| > >
| > > In article <3377AB...@hpl.hp.com>,
| > > Marc Fleischmann <ma...@hpl.hp.com> writes:
| > > >Does anybody happen to know about a x86 simulator for x86
| > > >Linux (not DOSEMU)?
| > > >
| > > >We'd like to be able to trap any single load/store machine
| > > >instruction (of certain user applications) in order to
| > > >generate memory reference/access traces.
| > > >
|
| > I'm presently working on one at the moment. Give me an email
| > in a couple of weeks if you can wait that long.
|
| > I'd be personally interested to know more about what you are
| > after.
|
| An 8086-emulator with 'breakpoints' would be a great tool for debugging
| and/or disassembling DOS programs. I find myself in need of the latter...
| have the emulator pause the "8086" when program-flow reaches a certain
| instruction. :-)

Look around for 'pcemu', it does just that. Runs in an X window with a


VGA font, emulates a 8086 at the instruction level, and has support for
debugging. You need a copy of msdos or some 8086-compatible OS to boot
it.

0 new messages