PSPSDK 2024-11-24
Loading...
Searching...
No Matches
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

◆ BCXF_OPCODE

#define BCXF_OPCODE   0x100

◆ BCXFL_OPCODE

#define BCXFL_OPCODE   0x102

◆ BCXT_OPCODE

#define BCXT_OPCODE   0x101

◆ BCXTL_OPCODE

#define BCXTL_OPCODE   0x103

◆ BEQ_OPCODE

#define BEQ_OPCODE   0x4

◆ BEQL_OPCODE

#define BEQL_OPCODE   0x14

◆ BGEZ_OPCODE

#define BGEZ_OPCODE   0x1

◆ BGEZAL_OPCODE

#define BGEZAL_OPCODE   0x11

◆ BGEZALL_OPCODE

#define BGEZALL_OPCODE   0x13

◆ BGEZL_OPCODE

#define BGEZL_OPCODE   0x3

◆ BGTZ_OPCODE

#define BGTZ_OPCODE   0x7

◆ BGTZL_OPCODE

#define BGTZL_OPCODE   0x17

◆ BLEZ_OPCODE

#define BLEZ_OPCODE   0x6

◆ BLEZL_OPCODE

#define BLEZL_OPCODE   0x16

◆ BLTZ_OPCODE

#define BLTZ_OPCODE   0

◆ BLTZAL_OPCODE

#define BLTZAL_OPCODE   0x10

◆ BLTZALL_OPCODE

#define BLTZALL_OPCODE   0x12

◆ BLTZL_OPCODE

#define BLTZL_OPCODE   0x2

◆ BNE_OPCODE

#define BNE_OPCODE   0x5

◆ BNEL_OPCODE

#define BNEL_OPCODE   0x15

◆ COP0_OPCODE

#define COP0_OPCODE   0x10

◆ COP1_OPCODE

#define COP1_OPCODE   0x11

◆ COP2_OPCODE

#define COP2_OPCODE   0x12

◆ DEBUG_PRINTF

#define DEBUG_PRINTF (   fmt,
  ... 
)

◆ J_OPCODE

#define J_OPCODE   0x2

◆ JAL_OPCODE

#define JAL_OPCODE   0x3

◆ JALR_OPCODE

#define JALR_OPCODE   0x9

◆ JR_OPCODE

#define JR_OPCODE   0x8

◆ MAX_BUF

#define MAX_BUF   2048

◆ REGIMM_OPCODE

#define REGIMM_OPCODE   0x1

◆ SPECIAL_OPCODE

#define SPECIAL_OPCODE   0

◆ SW_BREAK_INST

#define SW_BREAK_INST   0x0000000d

Function Documentation

◆ _GdbExceptionHandler()

void _GdbExceptionHandler ( void  )

◆ _gdbSupportLibFlushCaches()

◆ _gdbSupportLibInit()

int _gdbSupportLibInit ( void  )

◆ _gdbSupportLibReadByte()

int _gdbSupportLibReadByte ( unsigned char address,
unsigned char dest 
)

◆ _gdbSupportLibWriteByte()

int _gdbSupportLibWriteByte ( char  val,
unsigned char dest 
)

◆ asm()

asm ( ".global pspDebugBreakpoint\n" ".set noreorder\n" "pspDebugBreakpoint:\tbreak\n" "jr $31\n" "nop\n"  )

◆ build_trap_cmd()

void build_trap_cmd ( int  sigval,
PspDebugRegBlock regs 
)

◆ getDebugChar()

char getDebugChar ( void  )

◆ pspDebugBreakpoint()

void pspDebugBreakpoint ( void  )

◆ pspDebugResumeFromException()

void pspDebugResumeFromException ( void  )

◆ putDebugChar()

void putDebugChar ( char  ch)

◆ sceKernelResumeIntr()

void sceKernelResumeIntr ( int  intr)
extern

◆ sceKernelSuspendIntr()

int sceKernelSuspendIntr ( void  )
extern

Variable Documentation

◆ _pspDebugResumePatch

u32 _pspDebugResumePatch
extern