1 #ifndef _ASM_UML_STACKTRACE_H
2 #define _ASM_UML_STACKTRACE_H
4 #include <linux/uaccess.h>
5 #include <linux/ptrace.h>
8 struct stack_frame
*next_frame
;
9 unsigned long return_address
;
12 struct stacktrace_ops
{
13 void (*address
)(void *data
, unsigned long address
, int reliable
);
16 #ifdef CONFIG_FRAME_POINTER
17 static inline unsigned long
18 get_frame_pointer(struct task_struct
*task
, struct pt_regs
*segv_regs
)
20 if (!task
|| task
== current
)
21 return segv_regs
? PT_REGS_BP(segv_regs
) : current_bp();
22 return KSTK_EBP(task
);
25 static inline unsigned long
26 get_frame_pointer(struct task_struct
*task
, struct pt_regs
*segv_regs
)
32 static inline unsigned long
33 *get_stack_pointer(struct task_struct
*task
, struct pt_regs
*segv_regs
)
35 if (!task
|| task
== current
)
36 return segv_regs
? (unsigned long *)PT_REGS_SP(segv_regs
) : current_sp();
37 return (unsigned long *)KSTK_ESP(task
);
40 void dump_trace(struct task_struct
*tsk
, const struct stacktrace_ops
*ops
, void *data
);
42 #endif /* _ASM_UML_STACKTRACE_H */