Attached is another patch. This one includes:
- Josh's curses code (just the same, except that
I *did* run autoconf ;)).
- The kernel part of Jens's patch (rep ins, etc.)
- Major cleanup on user side; added files
freemware.c (containing main()), emulation.c,
emulation.h, bin.c, bin.h. Separated a lot
out of user.c into these files. This is almost
completely different than Jens's cleanup, except
that I did use his config_t structure.
Question --- does anybody have an idea how I can
easily check whether any #included headers are
unused ? Most files have a huge list of headers
and I'm pretty sure most of them are unneeded.
- Added rep ins and rep outs support to emulation.c.
Almost completely different than Jens's patch.
Also, *lots* of fixes in the previous ins/outs
code (direction flag goes the other way ! ;)
also, changed edi to esi for outs, etc.)
- Added emulation of INT3. Remote GDB now works
perfectly !!!
- Changed plugins/bochs/io.cc to correctly handle
rep ins/outs in the bochs framework (Kevin, is
this the right way ?)
- Changed a lot of fprintf() and printf() to
bx_printf() in plugins/bochs/*
There's one thing I didn't add: multiboot support.
I'm not convinced we need this, and I'm afraid the
code is going to get terribly cluttered. I'd rather
work with kludges until we are able to boot
"normally"....
PS what are all the *.orig files ? Can these
be removed ? Ulrich ?
Also, as far as I'm concerned, plugins/bochs/gui/macintosh.cc and all
references
to it can be removed.
Question:
I was thinking of adding interrupt interception
to the kernel module. The way I envision of doing
this is to create a bitmap for the interrupts, and
to set a bit when an interrupt is allocated.
raise_interrupt() would then check this bit and
if set, it would forward the interrupt to the
user monitor. Where should I put this bitmap ?
In nexus_t ?
-- Ramon
fmw.cln.patch.gz