IgrOS-Kernel 0.1.34.545
Simple C++20 Kernel for i386/x86_64
Loading...
Searching...
No Matches
igros::x86::except Class Referencefinal

Exceptions structure. More...

#include <arch/x86/exceptions.hpp>

Public Types

enum class  NUMBER : igros_dword_t {
  DIVIDE_BY_ZERO = 0_u32 , DEBUG = 1_u32 , NON_MASKABLE_IRQ = 2_u32 , BREAKPOINT = 3_u32 ,
  INTO_DETECTED_OVERFLOW = 4_u32 , BOUND_RANGE_EXCEEDED = 5_u32 , INVALID_OPCODE = 6_u32 , NO_COPROCESSOR = 7_u32 ,
  DOUBLE_FAULT = 8_u32 , COPROCESSOR_SEGMENT_OVERRUN = 9_u32 , INVALID_TSS = 10_u32 , SEGMENT_NOT_PRESENT = 11_u32 ,
  STACK_FAULT = 12_u32 , GENERAL_PROTECTION_FAULT = 13_u32 , PAGE_FAULT = 14_u32 , UNKNOWN_IRQ = 15_u32 ,
  COPROCESSOR_FAULT = 16_u32 , ALIGNMENT_CHECK = 17_u32 , MACHINE_CHECK = 18_u32
}
 Exceptions number enumeration. More...

Public Member Functions

 except (const except &other)=delete
 Copy c-tor.
auto operator= (const except &other) -> except &=delete
 Copy assignment.
 except (except &&other)=delete
 Move c-tor.
auto operator= (except &&other) -> except &=delete
 Move assignment.
 except () noexcept=default
 Default c-tor.
 ~except () noexcept=default
 D-tor.

Static Public Member Functions

static void init () noexcept
 Init exceptions.
template<NUMBER N, isr_t HANDLE>
static constexpr void install () noexcept
 Install exceptions handler.
template<NUMBER N>
static constexpr void uninstall () noexcept
 Uninstall exceptions handler.
static void defaultHandler (const register_t *regs) noexcept
 Default exception handler.

Static Public Attributes

static constexpr std::array< const char *const, 32_usize > NAME
 Exceptions names.

Detailed Description

Exceptions structure.

Definition at line 47 of file exceptions.hpp.

Member Enumeration Documentation

◆ NUMBER

Exceptions number enumeration.

Definition at line 98 of file exceptions.hpp.

Member Function Documentation

◆ defaultHandler()

void igros::x86::except::defaultHandler ( const register_t * regs)
staticnoexcept

Default exception handler.

Parameters
regsRegisters saved on exception

Definition at line 54 of file exceptions.cpp.

◆ init()

void igros::x86::except::init ( )
staticnoexcept

Init exceptions.

Definition at line 26 of file exceptions.cpp.

◆ install()

template<except::NUMBER N, isr_t HANDLE>
void igros::x86::except::install ( )
staticconstexprnoexcept

Install exceptions handler.

Install handler.

Definition at line 145 of file exceptions.hpp.

◆ uninstall()

template<except::NUMBER N>
void igros::x86::except::uninstall ( )
staticconstexprnoexcept

Uninstall exceptions handler.

Uninstall handler.

Definition at line 152 of file exceptions.hpp.

Member Data Documentation

◆ NAME

std::array<const char* const, 32_usize> igros::x86::except::NAME
staticconstexpr

Exceptions names.

Definition at line 62 of file exceptions.hpp.


The documentation for this class was generated from the following files: