Subject: Re: Which Gates to use?
To: None <cgd@alpha.bostic.com, mycroft@gnu.ai.mit.edu>
From: Wolfgang Solfrank <ws@tools.de>
List: port-i386
Date: 10/25/1994 21:02:14
> The old interface would just be a small piece of code that runs before
> the syscall handler; it would turn off the trap bit and save eflags.
> (It would have to save and restore a scratch register this way, but the
> real cost of that is small, and it's only for old executables anyway.)

This is exactly what the current code does.

> So, if the trace trap handler noticed that the pc is anywhere in that
> code, it would simply ignore the trap; otherwise it would call DDB or
> send a SIGTRAP, as appropriate.

I don't think that SIGTRAP is appropriate under these circumstances.
There is no (valid) possibility that the user code could turn on the
trace bit for system level code. Appropriate action is probably a panic.

> This allows one to trace through the new syscall handler, too.

Do you mean after setting a breakpoint at its start address? Note that I
never used DDB, and I'm stepping through syscall with KGDB all the time.
--
ws@TooLs.DE     (Wolfgang Solfrank, TooLs GmbH) +49-228-985800