PSPSDK 2024-10-31
Loading...
Searching...
No Matches
callstack.c File Reference
#include "pspdebug.h"
Include dependency graph for callstack.c:

Data Structures

struct  _returnCache
 

Macros

#define RESTORE_RETURNVAL   0x8fbf0000
 
#define RESTORE_RETURNVAL_MASK   0xffff0000
 
#define RESTORE_RETURNVAL2   0xdfbf0000
 
#define RESTORE_RETURNVAL3   0x7bbf0000
 
#define ADJUST_STACKP_C   0x27bd0000
 
#define ADJUST_STACKP_C_MASK   0xffff0000
 
#define ADJUST_STACKP_V   0x03a1e821
 
#define ADJUST_STACKP_V_MASK   0xffffffff
 
#define SET_UPPER_C   0x3c010000
 
#define SET_UPPER_C_MASK   0xffff0000
 
#define OR_LOWER_C   0x34210000
 
#define OR_LOWER_C_MASK   0xffff0000
 
#define SET_LOWER_C   0x34010000
 
#define SET_LOWER_C_MASK   0xffff0000
 
#define RETURN   0x03e00008
 
#define CALL(f)   (0x0c000000 | (((int) (f)) >> 2))
 
#define HASH_SIZE   256
 
#define HASH(ra)   ((((int) (ra)) >> 2) & (HASH_SIZE - 1))
 
#define TRUE   1
 
#define FALSE   0
 

Typedefs

typedef struct _returnCache ReturnCacheRec
 
typedef struct _returnCacheReturnCachePtr
 
typedef int Bool
 

Functions

unsigned intpspGetReturnAddress ()
 
unsigned intpspGetStackPointer ()
 
int main ()
 
int pspDebugGetStackTrace (unsigned int *results, int max)
 Get a MIPS stack trace (might work :P)
 

Variables

unsigned int _ftext
 
unsigned int _etext
 

Macro Definition Documentation

◆ ADJUST_STACKP_C

#define ADJUST_STACKP_C   0x27bd0000

◆ ADJUST_STACKP_C_MASK

#define ADJUST_STACKP_C_MASK   0xffff0000

◆ ADJUST_STACKP_V

#define ADJUST_STACKP_V   0x03a1e821

◆ ADJUST_STACKP_V_MASK

#define ADJUST_STACKP_V_MASK   0xffffffff

◆ CALL

#define CALL (   f)    (0x0c000000 | (((int) (f)) >> 2))

◆ FALSE

#define FALSE   0

◆ HASH

#define HASH (   ra)    ((((int) (ra)) >> 2) & (HASH_SIZE - 1))

◆ HASH_SIZE

#define HASH_SIZE   256

◆ OR_LOWER_C

#define OR_LOWER_C   0x34210000

◆ OR_LOWER_C_MASK

#define OR_LOWER_C_MASK   0xffff0000

◆ RESTORE_RETURNVAL

#define RESTORE_RETURNVAL   0x8fbf0000

◆ RESTORE_RETURNVAL2

#define RESTORE_RETURNVAL2   0xdfbf0000

◆ RESTORE_RETURNVAL3

#define RESTORE_RETURNVAL3   0x7bbf0000

◆ RESTORE_RETURNVAL_MASK

#define RESTORE_RETURNVAL_MASK   0xffff0000

◆ RETURN

#define RETURN   0x03e00008

◆ SET_LOWER_C

#define SET_LOWER_C   0x34010000

◆ SET_LOWER_C_MASK

#define SET_LOWER_C_MASK   0xffff0000

◆ SET_UPPER_C

#define SET_UPPER_C   0x3c010000

◆ SET_UPPER_C_MASK

#define SET_UPPER_C_MASK   0xffff0000

◆ TRUE

#define TRUE   1

Typedef Documentation

◆ Bool

◆ ReturnCachePtr

◆ ReturnCacheRec

Function Documentation

◆ main()

int main ( )
extern

Referenced by _main(), and pspDebugGetStackTrace().

◆ pspGetReturnAddress()

unsigned int * pspGetReturnAddress ( )
extern

Referenced by pspDebugGetStackTrace().

◆ pspGetStackPointer()

unsigned int * pspGetStackPointer ( )
extern

Referenced by pspDebugGetStackTrace().

Variable Documentation

◆ _etext

unsigned int _etext
extern

Referenced by pspDebugGetStackTrace().

◆ _ftext

unsigned int _ftext
extern

Referenced by pspDebugGetStackTrace().