The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
exception.h File Reference
#include "isr.h"

Go to the source code of this file.

Functions

void exception_initialize (void)
 initialize the exception handling subsystem.
void exception_handler (struct registers *regs)
 default exception handler.
void exception_dump_regs (const struct registers *regs)
 print the general-purpose and segment registers of a trapped context.
void exception_panic (const char *message, const struct registers *regs) __attribute__((noreturn))
 panic for a trapped context: prints the faulting pc and, for faults in kernel mode, a backtrace from the trapped frame.

Function Documentation

◆ exception_initialize()

void exception_initialize ( void )

initialize the exception handling subsystem.

this function registers a default exception handler for all CPU exceptions.

◆ exception_handler()

void exception_handler ( struct registers * regs)

default exception handler.

this function is called when a CPU exception occurs and no specific handler is registered for that exception

Parameters
regspointer to the registers structure containing the CPU state at the time of the exception.

◆ exception_dump_regs()

void exception_dump_regs ( const struct registers * regs)

print the general-purpose and segment registers of a trapped context.

Parameters
regsthe saved register state.

◆ exception_panic()

void exception_panic ( const char * message,
const struct registers * regs )

panic for a trapped context: prints the faulting pc and, for faults in kernel mode, a backtrace from the trapped frame.

Parameters
messagedescription of the fault.
regsthe saved register state.