This source file includes following definitions.
- unwind_done
- unwind_error
- unwind_start
- unwind_get_entry_regs
- unwind_init
- unwind_module_init
1
2 #ifndef _ASM_S390_UNWIND_H
3 #define _ASM_S390_UNWIND_H
4
5 #include <linux/sched.h>
6 #include <linux/ftrace.h>
7 #include <asm/ptrace.h>
8 #include <asm/stacktrace.h>
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 struct unwind_state {
33 struct stack_info stack_info;
34 unsigned long stack_mask;
35 struct task_struct *task;
36 struct pt_regs *regs;
37 unsigned long sp, ip;
38 bool reuse_sp;
39 int graph_idx;
40 bool reliable;
41 bool error;
42 };
43
44 void __unwind_start(struct unwind_state *state, struct task_struct *task,
45 struct pt_regs *regs, unsigned long first_frame);
46 bool unwind_next_frame(struct unwind_state *state);
47 unsigned long unwind_get_return_address(struct unwind_state *state);
48
49 static inline bool unwind_done(struct unwind_state *state)
50 {
51 return state->stack_info.type == STACK_TYPE_UNKNOWN;
52 }
53
54 static inline bool unwind_error(struct unwind_state *state)
55 {
56 return state->error;
57 }
58
59 static inline void unwind_start(struct unwind_state *state,
60 struct task_struct *task,
61 struct pt_regs *regs,
62 unsigned long sp)
63 {
64 sp = sp ? : get_stack_pointer(task, regs);
65 __unwind_start(state, task, regs, sp);
66 }
67
68 static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state)
69 {
70 return unwind_done(state) ? NULL : state->regs;
71 }
72
73 #define unwind_for_each_frame(state, task, regs, first_frame) \
74 for (unwind_start(state, task, regs, first_frame); \
75 !unwind_done(state); \
76 unwind_next_frame(state))
77
78 static inline void unwind_init(void) {}
79 static inline void unwind_module_init(struct module *mod, void *orc_ip,
80 size_t orc_ip_size, void *orc,
81 size_t orc_size) {}
82
83 #endif