Question
I'm looking for a list and description of the various traps used
by NeXTstep/68k.
As far as I can see, traps nr. 3, 4, 5 and 6 are used. Trap 4 is
used for system calls - what are the other traps used for?
Response
some parts of the puzzle are solved - trap #3 calls Mach
functions with the number specified in d0 as an index into
the mach_trap_table. If the number in d0 is negative, some
processing concerning ast's (asynchronous system traps) seems
to occur - I'll have to read up on this.
Traps #5 and #6 just retrieve resp. set a long value at offset 0x50
in a structure (perhaps a struct pcb) pointed to by an element
(pointer at offset 0x24) of active_threads (which seems to be a
struct task *). Without a description of the struct itself, this
will be difficult to decode. From the use in some binaries (cp, sh),
this is some kind of pointer, but I don't have a clue what this
points to... some setjmp()/longjmp() stuff perhaps?