ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
callstacktest.c File Reference
#include <stdio.h>
#include <tamtypes.h>
#include <debug.h>
+ Include dependency graph for callstacktest.c:

Go to the source code of this file.

Functions

int TestFunction3 ()
 
int TestFunction2 ()
 
int testFunction1 ()
 
int main ()
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 45 of file callstacktest.c.

46 {
47  testFunction1();
48 
49  while(1)
50  {
51  }
52 
53  return 0;
54 }
int testFunction1()
Definition: callstacktest.c:40

References testFunction1().

◆ testFunction1()

int testFunction1 ( )

Definition at line 40 of file callstacktest.c.

41 {
42  return TestFunction2();
43 }
int TestFunction2()
Definition: callstacktest.c:35

References TestFunction2().

Referenced by main().

◆ TestFunction2()

int TestFunction2 ( )

Definition at line 35 of file callstacktest.c.

36 {
37  return TestFunction3();
38 }
int TestFunction3()
Definition: callstacktest.c:17

References TestFunction3().

Referenced by testFunction1().

◆ TestFunction3()

int TestFunction3 ( )

A bunch of test function that we use to test the stacktrace.

Definition at line 17 of file callstacktest.c.

18 {
19  unsigned int* stackTrace[256];
20  int i = 0;
21 
22  ps2GetStackTrace((unsigned int*)&stackTrace,256);
23 
24  for(i = 0; i < 256; ++i)
25  {
26  if (stackTrace[i] == 0)
27  break;
28 
29  printf("adress %d 0x%08x\n",i,(int)stackTrace[i]);
30  }
31 
32  return 0;
33 }
void ps2GetStackTrace(unsigned int *results, int max)
Definition: callstack.c:119

References ps2GetStackTrace().

Referenced by TestFunction2().