#include <oskit/x86/base_trap.h>void (*base_trap_handlers [BASE_TRAP_COUNT]) (struct trap_state *ts);
Contains a function pointer for every hardware trap vector. By default, all entries in this table point to base_trap_default_handler, which will simply dump the register state to the console and panic. The client OS can set entries in this table to point to its own trap handler function(s), or to alternative trap handlers supplied by the OSKit, such as the remote GDB debugging trap handler, gdb_trap (see Section 10.17.5).
- state
- A pointer to the trap state structure to dump.
The trap handler returns zero (success) to resume execution, or nonzero (failure) to cause the entrypoint code to dump the register state and panic the kernel.