Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info. |
NeXTSTEP 68k trap types
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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?