1
2 #ifndef _UNWIND_H_
3 #define _UNWIND_H_
4
5 #include <linux/list.h>
6
7
8 #define MAX_UNWIND_ENTRIES 30
9
10
11 struct unwind_table_entry {
12 unsigned int region_start;
13 unsigned int region_end;
14 unsigned int Cannot_unwind:1;
15 unsigned int Millicode:1;
16 unsigned int Millicode_save_sr0:1;
17 unsigned int Region_description:2;
18 unsigned int reserved1:1;
19 unsigned int Entry_SR:1;
20 unsigned int Entry_FR:4;
21 unsigned int Entry_GR:5;
22 unsigned int Args_stored:1;
23 unsigned int Variable_Frame:1;
24 unsigned int Separate_Package_Body:1;
25 unsigned int Frame_Extension_Millicode:1;
26 unsigned int Stack_Overflow_Check:1;
27 unsigned int Two_Instruction_SP_Increment:1;
28 unsigned int Ada_Region:1;
29 unsigned int cxx_info:1;
30 unsigned int cxx_try_catch:1;
31 unsigned int sched_entry_seq:1;
32 unsigned int reserved2:1;
33 unsigned int Save_SP:1;
34 unsigned int Save_RP:1;
35 unsigned int Save_MRP_in_frame:1;
36 unsigned int extn_ptr_defined:1;
37 unsigned int Cleanup_defined:1;
38
39 unsigned int MPE_XL_interrupt_marker:1;
40 unsigned int HP_UX_interrupt_marker:1;
41 unsigned int Large_frame:1;
42 unsigned int Pseudo_SP_Set:1;
43 unsigned int reserved4:1;
44 unsigned int Total_frame_size:27;
45 };
46
47 struct unwind_table {
48 struct list_head list;
49 const char *name;
50 unsigned long gp;
51 unsigned long base_addr;
52 unsigned long start;
53 unsigned long end;
54 const struct unwind_table_entry *table;
55 unsigned long length;
56 };
57
58 struct unwind_frame_info {
59 struct task_struct *t;
60
61
62
63
64 unsigned long sp, ip, rp, r31;
65 unsigned long prev_sp, prev_ip;
66 };
67
68 struct unwind_table *
69 unwind_table_add(const char *name, unsigned long base_addr,
70 unsigned long gp, void *start, void *end);
71 void
72 unwind_table_remove(struct unwind_table *table);
73
74 void unwind_frame_init(struct unwind_frame_info *info, struct task_struct *t,
75 struct pt_regs *regs);
76 void unwind_frame_init_from_blocked_task(struct unwind_frame_info *info,
77 struct task_struct *t);
78 void unwind_frame_init_task(struct unwind_frame_info *info,
79 struct task_struct *task, struct pt_regs *regs);
80 int unwind_once(struct unwind_frame_info *info);
81 int unwind_to_user(struct unwind_frame_info *info);
82
83 int unwind_init(void);
84
85 #endif