pspsdk-1.0+beta2
gdb-stub.c File Reference
#include <pspkernel.h>
#include <pspdebug.h>
#include <string.h>
#include <signal.h>
Include dependency graph for gdb-stub.c:

Data Structures

struct  sw_breakpoint
struct  hard_trap_info

Macros

#define DEBUG_PRINTF(fmt,...)
#define MAX_BUF   2048
#define SW_BREAK_INST   0x0000000d
#define BEQ_OPCODE   0x4
#define BEQL_OPCODE   0x14
#define BGTZ_OPCODE   0x7
#define BGTZL_OPCODE   0x17
#define BLEZ_OPCODE   0x6
#define BLEZL_OPCODE   0x16
#define BNE_OPCODE   0x5
#define BNEL_OPCODE   0x15
#define REGIMM_OPCODE   0x1
#define BGEZ_OPCODE   0x1
#define BGEZAL_OPCODE   0x11
#define BGEZALL_OPCODE   0x13
#define BGEZL_OPCODE   0x3
#define BLTZ_OPCODE   0
#define BLTZAL_OPCODE   0x10
#define BLTZALL_OPCODE   0x12
#define BLTZL_OPCODE   0x2
#define J_OPCODE   0x2
#define JAL_OPCODE   0x3
#define SPECIAL_OPCODE   0
#define JALR_OPCODE   0x9
#define JR_OPCODE   0x8
#define COP0_OPCODE   0x10
#define COP1_OPCODE   0x11
#define COP2_OPCODE   0x12
#define BCXF_OPCODE   0x100
#define BCXFL_OPCODE   0x102
#define BCXT_OPCODE   0x101
#define BCXTL_OPCODE   0x103

Functions

void pspDebugBreakpoint (void)
void putDebugChar (char ch)
char getDebugChar (void)
int _gdbSupportLibWriteByte (char val, unsigned char *dest)
int _gdbSupportLibReadByte (unsigned char *address, unsigned char *dest)
void pspDebugResumeFromException (void)
void _gdbSupportLibFlushCaches (void)
int sceKernelSuspendIntr (void)
void sceKernelResumeIntr (int intr)
void _GdbExceptionHandler (void)
int _gdbSupportLibInit (void)
void pspDebugGdbStubInit (void)
 Install the gdb stub handler.
void build_trap_cmd (int sigval, PspDebugRegBlock *regs)
 asm (".global pspDebugBreakpoint\n"".set noreorder\n""pspDebugBreakpoint:\tbreak\n""jr $31\n""nop\n")

Variables

u32 _pspDebugResumePatch

Macro Definition Documentation

#define BCXF_OPCODE   0x100
#define BCXFL_OPCODE   0x102
#define BCXT_OPCODE   0x101
#define BCXTL_OPCODE   0x103
#define BEQ_OPCODE   0x4
#define BEQL_OPCODE   0x14
#define BGEZ_OPCODE   0x1
#define BGEZAL_OPCODE   0x11
#define BGEZALL_OPCODE   0x13
#define BGEZL_OPCODE   0x3
#define BGTZ_OPCODE   0x7
#define BGTZL_OPCODE   0x17
#define BLEZ_OPCODE   0x6
#define BLEZL_OPCODE   0x16
#define BLTZ_OPCODE   0
#define BLTZAL_OPCODE   0x10
#define BLTZALL_OPCODE   0x12
#define BLTZL_OPCODE   0x2
#define BNE_OPCODE   0x5
#define BNEL_OPCODE   0x15
#define COP0_OPCODE   0x10
#define COP1_OPCODE   0x11
#define COP2_OPCODE   0x12
#define DEBUG_PRINTF (   fmt,
  ... 
)
#define J_OPCODE   0x2
#define JAL_OPCODE   0x3
#define JALR_OPCODE   0x9
#define JR_OPCODE   0x8
#define MAX_BUF   2048
#define REGIMM_OPCODE   0x1
#define SPECIAL_OPCODE   0
#define SW_BREAK_INST   0x0000000d

Function Documentation

void _GdbExceptionHandler ( void  )
void _gdbSupportLibFlushCaches ( void  )
int _gdbSupportLibInit ( void  )
int _gdbSupportLibReadByte ( unsigned char *  address,
unsigned char *  dest 
)
int _gdbSupportLibWriteByte ( char  val,
unsigned char *  dest 
)
asm ( ".global pspDebugBreakpoint\n"".set noreorder\n""pspDebugBreakpoint:\tbreak\n""jr $31\n""nop\n"  )
void build_trap_cmd ( int  sigval,
PspDebugRegBlock regs 
)
char getDebugChar ( void  )
void pspDebugBreakpoint ( void  )
void pspDebugResumeFromException ( void  )
void putDebugChar ( char  ch)
void sceKernelResumeIntr ( int  intr)
int sceKernelSuspendIntr ( void  )

Variable Documentation

u32 _pspDebugResumePatch