PS2SDK
PS2 Homebrew Libraries
ioptrap.c File Reference
#include "types.h"
#include "defs.h"
#include "irx.h"
#include "ioptrap.h"
#include "excepman.h"
#include "loadcore.h"
#include "sifman.h"
#include "stdio.h"
#include "sysclib.h"
#include "thbase.h"
+ Include dependency graph for ioptrap.c:

Go to the source code of this file.

Macros

#define MODNAME   "ioptrap_driver"
 
#define JUMP_BUF_PC   0
 
#define JUMP_BUF_SP   1
 
#define JUMP_BUF_FP   2
 
#define JUMP_BUF_S0   3
 
#define JUMP_BUF_S1   4
 
#define JUMP_BUF_S2   5
 
#define JUMP_BUF_S3   6
 
#define JUMP_BUF_S4   7
 
#define JUMP_BUF_S5   8
 
#define JUMP_BUF_S6   9
 
#define JUMP_BUF_S7   10
 
#define JUMP_BUF_GP   11
 
#define TRAP_PRINTF(args...)   printf(MODNAME ": " args)
 
#define do_tests()
 

Functions

 IRX_ID (MODNAME, 1, 1)
 
const char * get_exception_name (exception_type_t type)
 
void def_exc_handler ()
 
void bp_exc_handler ()
 
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 trap (exception_type_t type, struct exception_frame *ex)
 
int _start (int argc, char *argv[])
 
int shutdown ()
 

Variables

struct irx_export_table _exp_ioptrap
 
static const char * exception_type_name []
 
exception_frame_t __trap_frame
 
int dbg_jmp_buf_setup = 0
 
jmp_buf dbg_jmp_buf
 
static trap_exception_handler_t handlers [16]
 

Detailed Description

IOP exception handling.

Definition in file ioptrap.c.

Variable Documentation

◆ exception_type_name

const char* exception_type_name[]
static
Initial value:
= {
"Interrupt",
"TLB Modification",
"TLB Miss Load",
"TLB Miss Store",
"Address Error Load",
"Address Error Store",
"Instruction Bus Error",
"Data Bus Error",
"Syscall",
"Breakpoint",
"Reserved Instruction",
"Coprocessor Unusable",
"Overflow",
"Reserved 13",
"Reserved 14"
}

Definition at line 34 of file ioptrap.c.