KallistiOS
git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
stack.h
Go to the documentation of this file.
1
/* KallistiOS ##version##
2
3
arch/dreamcast/include/arch/stack.h
4
(c)2002 Megan Potter
5
6
*/
7
8
/** \file arch/stack.h
9
\brief Stack tracing.
10
\ingroup debugging_stacktrace
11
12
The functions in this file deal with doing stack traces. These functions
13
will do a stack trace, as specified, printing it out to stdout (usually a
14
dcload terminal). These functions only work if frame pointers have been
15
enabled at compile time (-DFRAME_POINTERS and no -fomit-frame-pointer flag).
16
17
\author Megan Potter
18
*/
19
20
#ifndef __ARCH_STACK_H
21
#define __ARCH_STACK_H
22
23
#include <sys/cdefs.h>
24
__BEGIN_DECLS
25
26
#include <
arch/types.h
>
27
28
/** \defgroup debugging_stacktrace Stack Traces
29
\brief API for managing stack backtracing
30
\ingroup debugging
31
32
@{
33
*/
34
35
/** \brief Do a stack trace from the current function.
36
37
This function does a stack trace from the current function, printing the
38
results to stdout. This is used, for instance, when an assertion fails in
39
assert().
40
41
\param n The number of frames to leave off. Each frame is a
42
jump to subroutine or branch to subroutine. assert()
43
leaves off 2 frames, for reference.
44
*/
45
void
arch_stk_trace
(
int
n);
46
47
/** \brief Do a stack trace from the current function.
48
49
This function does a stack trace from the the specified frame pointer,
50
printing the results to stdout. This could be used for doing something like
51
stack tracing a main thread from inside an IRQ handler.
52
53
\param fp The frame pointer to start from.
54
\param n The number of frames to leave off.
55
*/
56
void
arch_stk_trace_at
(uint32_t fp,
size_t
n);
57
58
/** @} */
59
60
__END_DECLS
61
62
#endif
/* __ARCH_EXEC_H */
63
arch_stk_trace_at
void arch_stk_trace_at(uint32_t fp, size_t n)
Do a stack trace from the current function.
arch_stk_trace
void arch_stk_trace(int n)
Do a stack trace from the current function.
types.h
Common integer types.
kernel
arch
dreamcast
include
arch
stack.h
Generated by
1.11.0