sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
excepman.h File Reference
#include <types.h>
#include <irx.h>

Go to the source code of this file.

Classes

struct  _exception_handler_struct_t

Macros

#define IOP_EXCEPTION_INT   0
#define IOP_EXCEPTION_MOD   1
#define IOP_EXCEPTION_TLBL   2
#define IOP_EXCEPTION_TLBS   3
#define IOP_EXCEPTION_ADEL   4
#define IOP_EXCEPTION_ADES   5
#define IOP_EXCEPTION_IBE   6
#define IOP_EXCEPTION_DBE   7
#define IOP_EXCEPTION_SYS   8
#define IOP_EXCEPTION_BP   9
#define IOP_EXCEPTION_RI   10
#define IOP_EXCEPTION_CPU   11
#define IOP_EXCEPTION_OVF   12
#define IOP_EXCEPTION_R13   13
#define IOP_EXCEPTION_R14   14
#define IOP_EXCEPTION_HDB   15
#define excepman_IMPORTS_start   DECLARE_IMPORT_TABLE(excepman, 1, 2)
#define excepman_IMPORTS_end   END_IMPORT_TABLE
#define I_GetExHandlersTable   DECLARE_IMPORT(3, GetExHandlersTable)
#define I_RegisterExceptionHandler   DECLARE_IMPORT(4, RegisterExceptionHandler)
#define I_RegisterPriorityExceptionHandler   DECLARE_IMPORT(5, RegisterPriorityExceptionHandler)
#define I_RegisterDefaultExceptionHandler   DECLARE_IMPORT(6, RegisterDefaultExceptionHandler)
#define I_ReleaseExceptionHandler   DECLARE_IMPORT(7, ReleaseExceptionHandler)
#define I_ReleaseDefaultExceptionHandler   DECLARE_IMPORT(8, ReleaseDefaultExceptionHandler)

Typedefs

typedef struct _exception_handler_struct_t exception_handler_struct_t
typedef exception_handler_struct_t * exception_handler_t

Functions

void * GetExHandlersTable ()
int RegisterExceptionHandler (int exception, exception_handler_t handler)
int RegisterPriorityExceptionHandler (int exception, int priority, exception_handler_t handler)
int RegisterDefaultExceptionHandler (exception_handler_t handler)
int ReleaseExceptionHandler (int exception, exception_handler_t handler)
int ReleaseDefaultExceptionHandler (exception_handler_t handler)

Detailed Description

Definitions and imports for excepman

Definition in file excepman.h.

Macro Definition Documentation

◆ excepman_IMPORTS_end

#define excepman_IMPORTS_end   END_IMPORT_TABLE

Definition at line 80 of file excepman.h.

◆ excepman_IMPORTS_start

#define excepman_IMPORTS_start   DECLARE_IMPORT_TABLE(excepman, 1, 2)

Definition at line 79 of file excepman.h.

◆ I_GetExHandlersTable

#define I_GetExHandlersTable   DECLARE_IMPORT(3, GetExHandlersTable)

Definition at line 82 of file excepman.h.

◆ I_RegisterDefaultExceptionHandler

#define I_RegisterDefaultExceptionHandler   DECLARE_IMPORT(6, RegisterDefaultExceptionHandler)

Definition at line 85 of file excepman.h.

◆ I_RegisterExceptionHandler

#define I_RegisterExceptionHandler   DECLARE_IMPORT(4, RegisterExceptionHandler)

Definition at line 83 of file excepman.h.

◆ I_RegisterPriorityExceptionHandler

#define I_RegisterPriorityExceptionHandler   DECLARE_IMPORT(5, RegisterPriorityExceptionHandler)

Definition at line 84 of file excepman.h.

◆ I_ReleaseDefaultExceptionHandler

#define I_ReleaseDefaultExceptionHandler   DECLARE_IMPORT(8, ReleaseDefaultExceptionHandler)

Definition at line 87 of file excepman.h.

◆ I_ReleaseExceptionHandler

#define I_ReleaseExceptionHandler   DECLARE_IMPORT(7, ReleaseExceptionHandler)

Definition at line 86 of file excepman.h.

◆ IOP_EXCEPTION_ADEL

#define IOP_EXCEPTION_ADEL   4

Address Error Exception (Load or instruction fetch)

Definition at line 37 of file excepman.h.

◆ IOP_EXCEPTION_ADES

#define IOP_EXCEPTION_ADES   5

Address Error Exception (Store)

Definition at line 39 of file excepman.h.

◆ IOP_EXCEPTION_BP

#define IOP_EXCEPTION_BP   9

Breakpoint Exception

Definition at line 47 of file excepman.h.

◆ IOP_EXCEPTION_CPU

#define IOP_EXCEPTION_CPU   11

Co-Processor Unusable Exception

Definition at line 51 of file excepman.h.

◆ IOP_EXCEPTION_DBE

#define IOP_EXCEPTION_DBE   7

Bus Error Exception (for data Load or Store)

Definition at line 43 of file excepman.h.

◆ IOP_EXCEPTION_HDB

#define IOP_EXCEPTION_HDB   15

Hardware DeBug(aka "Hardware Breakpoint")

Definition at line 59 of file excepman.h.

◆ IOP_EXCEPTION_IBE

#define IOP_EXCEPTION_IBE   6

Bus Error Exception (for Instruction Fetch)

Definition at line 41 of file excepman.h.

◆ IOP_EXCEPTION_INT

#define IOP_EXCEPTION_INT   0

External Interrupt

Definition at line 29 of file excepman.h.

◆ IOP_EXCEPTION_MOD

#define IOP_EXCEPTION_MOD   1

TLB Modification Exception

Definition at line 31 of file excepman.h.

◆ IOP_EXCEPTION_OVF

#define IOP_EXCEPTION_OVF   12

Arithmetic Overflow Exception

Definition at line 53 of file excepman.h.

◆ IOP_EXCEPTION_R13

#define IOP_EXCEPTION_R13   13

Reserved 13

Definition at line 55 of file excepman.h.

◆ IOP_EXCEPTION_R14

#define IOP_EXCEPTION_R14   14

Reserved 14. This is FPE though, but won't be useful on IOP.

Definition at line 57 of file excepman.h.

◆ IOP_EXCEPTION_RI

#define IOP_EXCEPTION_RI   10

Reserved Instruction Exception

Definition at line 49 of file excepman.h.

◆ IOP_EXCEPTION_SYS

#define IOP_EXCEPTION_SYS   8

SYSCALL Exception

Definition at line 45 of file excepman.h.

◆ IOP_EXCEPTION_TLBL

#define IOP_EXCEPTION_TLBL   2

TLB miss Exception (Load or instruction fetch)

Definition at line 33 of file excepman.h.

◆ IOP_EXCEPTION_TLBS

#define IOP_EXCEPTION_TLBS   3

TLB miss exception (Store)

Definition at line 35 of file excepman.h.

Typedef Documentation

◆ exception_handler_t

typedef exception_handler_struct_t* exception_handler_t

Definition at line 68 of file excepman.h.

Function Documentation

◆ GetExHandlersTable()

void * GetExHandlersTable ( )
extern

Definition at line 167 of file excepman.c.

◆ RegisterDefaultExceptionHandler()

int RegisterDefaultExceptionHandler ( exception_handler_t handler)
extern

Definition at line 109 of file excepman.c.

◆ RegisterExceptionHandler()

int RegisterExceptionHandler ( int exception,
exception_handler_t handler )
extern

will call RegisterPriorityExceptionHandler with prio = 2

Definition at line 70 of file excepman.c.

◆ RegisterPriorityExceptionHandler()

int RegisterPriorityExceptionHandler ( int exception,
int priority,
exception_handler_t handler )
extern

Definition at line 75 of file excepman.c.

◆ ReleaseDefaultExceptionHandler()

int ReleaseDefaultExceptionHandler ( exception_handler_t handler)
extern

Definition at line 145 of file excepman.c.

◆ ReleaseExceptionHandler()

int ReleaseExceptionHandler ( int exception,
exception_handler_t handler )
extern

Definition at line 119 of file excepman.c.