Subject: Re: Sun3 binary on NetBSD i386
To: Thomas Runge <coto@core.de>
From: ali (Anders Lindgren) <dat94ali@ludat.lth.se>
List: netbsd-help
Date: 01/29/2004 13:57:49
On Thu, 29 Jan 2004, Thomas Runge wrote:

> On Thu, 29 Jan 2004, Joachim Förster wrote:
>
> > Perry E. Metzger schrieb:
> > ~ > You'll have to write a 68k emulator for NetBSD first, I'd assume,
> > | since the processors in a Sun 3 and in a PC are not binary compatible.
> >
> > So, I assume that there is no such emulator?!
>
> Well, there is UAE, an Amiga emulator featuring something like
> that. It must be possible to reuse some of it's code, at least
> the PalmOS-guys did that with their PalmOS-emulator (which
> is OpenSource as well).

GDB comes with target simulators for a some CPUs -- so there
may already be an emulation of the m68k CPU as such (Sun3s sport
an m68030 or something right?) available.

That said, emulating the CPU won't take him all that far -- assuming
the binary isn't allowed to poke at hardware, there is still the
issue of catching and emulating all syscalls. ISTR the gdb simulators
are prepared with hooks for doing this, but it's been some time since
I digged in gdb internals. Still sounds like a lot of work to me...

-- 
/ali
:wq