1 /*
2  * Copyright (C) 2015-2017 Alibaba Group Holding Limited
3  */
4 
5 #ifndef BACKTRACE_H
6 #define BACKTRACE_H
7 
8 /* printf call stack
9    return levels of call stack */
10 int backtrace_now(int (*print_func)(const char *fmt, ...));
11 
12 /* printf call stack for task
13    return levels of call stack */
14 int backtrace_task(char *taskname, int (*print_func)(const char *fmt, ...));
15 
16 /* backtrace start with PC and SP, find LR from stack memory
17    return levels of call stack */
18 int backtrace_caller(char *PC, int *SP,
19                      int (*print_func)(const char *fmt, ...));
20 
21 /* backtrace start with PC SP and LR
22    return levels of call stack */
23 int backtrace_callee(char *PC, int *SP, char *LR,
24                      int (*print_func)(const char *fmt, ...));
25 
26 #endif /* BACKTRACE_H */
27