Subject: ktrace/kdump fixes to support emulation changes.
To: None <tech-kern@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: tech-kern
Date: 07/14/1995 22:56:56
I just finished adding ktrace support for emulation switches. The way I
did it, is to add a KTR_EMUL field similar to KTR_NAMEI that contains
the emulation name. execve now spits out a KTR_EMUL field when it
succeeds.  I modified kdump to switch to the appropriate system call
names array depending on the name in the KTR_EMUL field. The fixes are
really small...

The problem with this approach is that when you attach to a process, you
don't know what emulation it is currently running; you could change the
attach code to spit out a KTR_EMUL record, or you can leave it to the
user [what I did: I added a flag to kdump to specify the name of the
initial emulation].

A better fix is to include the emulation name on every system call, but
that will make the trace file much larger.

Ideas?

christos