ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
callstacktest.c
Go to the documentation of this file.
1
/*
2
# _____ ___ ____ ___ ____
3
# ____| | ____| | | |____|
4
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5
#-----------------------------------------------------------------------
6
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7
# Licenced under Academic Free License version 2.0
8
# Review ps2sdk README & LICENSE files for further details.
9
*/
10
11
#include <stdio.h>
12
#include <
tamtypes.h
>
13
#include <
debug.h
>
14
17
int
TestFunction3
()
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
}
34
35
int
TestFunction2
()
36
{
37
return
TestFunction3
();
38
}
39
40
int
testFunction1
()
41
{
42
return
TestFunction2
();
43
}
44
45
int
main
()
46
{
47
testFunction1
();
48
49
while
(1)
50
{
51
}
52
53
return
0;
54
}
TestFunction2
int TestFunction2()
Definition:
callstacktest.c:35
TestFunction3
int TestFunction3()
Definition:
callstacktest.c:17
testFunction1
int testFunction1()
Definition:
callstacktest.c:40
main
int main()
Definition:
callstacktest.c:45
debug.h
ps2GetStackTrace
void ps2GetStackTrace(unsigned int *results, int max)
Definition:
callstack.c:119
tamtypes.h
ee
debug
samples
callstacktest
callstacktest.c
Generated on Thu Feb 11 2021 11:42:21 for ps2sdk by
1.9.2