PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
ioptrap.h File Reference
#include <types.h>
#include <irx.h>
+ Include dependency graph for ioptrap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  exception_frame
 

Macros

#define DCIC_WR   (1 << 27)
 
#define DCIC_RD   (1 << 26)
 
#define DCIC_DA   (1 << 25)
 
#define DCIC_PC   (1 << 24)
 
#define ioptrap_IMPORTS_start   DECLARE_IMPORT_TABLE(ioptrap, 1, 1)
 
#define ioptrap_IMPORTS_end   END_IMPORT_TABLE
 
#define I_get_exception_name   DECLARE_IMPORT(4, get_exception_name)
 
#define I_dbg_setjmp   DECLARE_IMPORT(5, dbg_setjmp)
 
#define I_set_exception_handler   DECLARE_IMPORT(6, set_exception_handler)
 
#define I_get_exception_handler   DECLARE_IMPORT(7, get_exception_handler)
 
#define I_set_dba   DECLARE_IMPORT(8, set_dba)
 
#define I_set_dbam   DECLARE_IMPORT(9, set_dbam)
 
#define I_set_dcic   DECLARE_IMPORT(10, set_dcic)
 
#define I_get_dba   DECLARE_IMPORT(11, get_dba)
 
#define I_get_dbam   DECLARE_IMPORT(12, get_dbam)
 
#define I_get_dcic   DECLARE_IMPORT(13, get_dcic)
 

Typedefs

typedef struct exception_frame exception_frame_t
 
typedef void(* trap_exception_handler_t) (exception_type_t, exception_frame_t *)
 

Enumerations

enum  exception_type_t {
  EXCEPTION_Int , EXCEPTION_Mod , EXCEPTION_TLBL , EXCEPTION_TLBS ,
  EXCEPTION_AdEL , EXCEPTION_AdES , EXCEPTION_IBE , EXCEPTION_DBE ,
  EXCEPTION_Syscall , EXCEPTION_Bp , EXCEPTION_RI , EXCEPTION_CpU ,
  EXCEPTION_Ov , EXCEPTION_RESERVED13 , EXCEPTION_RESERVED14
}
 

Functions

const char * get_exception_name (exception_type_t type)
 
exception_type_t dbg_setjmp ()
 
trap_exception_handler_t set_exception_handler (exception_type_t type, trap_exception_handler_t handler)
 
trap_exception_handler_t get_exception_handler (exception_type_t type)
 
void set_dba (u32 v)
 
void set_dbam (u32 v)
 
void set_dcic (u32 v)
 
u32 get_dba ()
 
u32 get_dbam ()
 
u32 get_dcic ()
 

Detailed Description

IOP exception handling.

Definition in file ioptrap.h.


Data Structure Documentation

◆ exception_frame

struct exception_frame

Definition at line 41 of file ioptrap.h.

Data Fields
u32 epc
u32 cause
u32 badvaddr
u32 sr
u32 regs[32]
u32 hi
u32 lo
u32 dcic

Macro Definition Documentation

◆ DCIC_WR

#define DCIC_WR   (1 << 27)

Definition at line 57 of file ioptrap.h.

◆ DCIC_RD

#define DCIC_RD   (1 << 26)

Definition at line 58 of file ioptrap.h.

◆ DCIC_DA

#define DCIC_DA   (1 << 25)

Definition at line 59 of file ioptrap.h.

◆ DCIC_PC

#define DCIC_PC   (1 << 24)

Definition at line 60 of file ioptrap.h.

◆ ioptrap_IMPORTS_start

#define ioptrap_IMPORTS_start   DECLARE_IMPORT_TABLE(ioptrap, 1, 1)

Definition at line 82 of file ioptrap.h.

◆ ioptrap_IMPORTS_end

#define ioptrap_IMPORTS_end   END_IMPORT_TABLE

Definition at line 83 of file ioptrap.h.

◆ I_get_exception_name

#define I_get_exception_name   DECLARE_IMPORT(4, get_exception_name)

Definition at line 85 of file ioptrap.h.

◆ I_dbg_setjmp

#define I_dbg_setjmp   DECLARE_IMPORT(5, dbg_setjmp)

Definition at line 86 of file ioptrap.h.

◆ I_set_exception_handler

#define I_set_exception_handler   DECLARE_IMPORT(6, set_exception_handler)

Definition at line 87 of file ioptrap.h.

◆ I_get_exception_handler

#define I_get_exception_handler   DECLARE_IMPORT(7, get_exception_handler)

Definition at line 88 of file ioptrap.h.

◆ I_set_dba

#define I_set_dba   DECLARE_IMPORT(8, set_dba)

Definition at line 89 of file ioptrap.h.

◆ I_set_dbam

#define I_set_dbam   DECLARE_IMPORT(9, set_dbam)

Definition at line 90 of file ioptrap.h.

◆ I_set_dcic

#define I_set_dcic   DECLARE_IMPORT(10, set_dcic)

Definition at line 91 of file ioptrap.h.

◆ I_get_dba

#define I_get_dba   DECLARE_IMPORT(11, get_dba)

Definition at line 92 of file ioptrap.h.

◆ I_get_dbam

#define I_get_dbam   DECLARE_IMPORT(12, get_dbam)

Definition at line 93 of file ioptrap.h.

◆ I_get_dcic

#define I_get_dcic   DECLARE_IMPORT(13, get_dcic)

Definition at line 94 of file ioptrap.h.

Typedef Documentation

◆ trap_exception_handler_t

typedef void(* trap_exception_handler_t) (exception_type_t, exception_frame_t *)

Definition at line 55 of file ioptrap.h.

Enumeration Type Documentation

◆ exception_type_t

enum exception_type_t

Definition at line 23 of file ioptrap.h.

Function Documentation

◆ get_exception_name()

const char * get_exception_name ( exception_type_t  type)

Definition at line 52 of file ioptrap.c.

◆ dbg_setjmp()

exception_type_t dbg_setjmp ( )

Definition at line 64 of file ioptrap.c.

◆ set_exception_handler()

trap_exception_handler_t set_exception_handler ( exception_type_t  type,
trap_exception_handler_t  handler 
)

Definition at line 147 of file ioptrap.c.

◆ get_exception_handler()

trap_exception_handler_t get_exception_handler ( exception_type_t  type)

Definition at line 154 of file ioptrap.c.

◆ set_dba()

void set_dba ( u32  v)

Definition at line 13 of file breakpoint.c.

◆ set_dbam()

void set_dbam ( u32  v)

Definition at line 20 of file breakpoint.c.

◆ set_dcic()

void set_dcic ( u32  v)

Definition at line 27 of file breakpoint.c.

◆ get_dba()

u32 get_dba ( )

Definition at line 34 of file breakpoint.c.

◆ get_dbam()

u32 get_dbam ( )

Definition at line 42 of file breakpoint.c.

◆ get_dcic()

u32 get_dcic ( )

Definition at line 50 of file breakpoint.c.