1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef _ASM_UML_STACKTRACE_H 3 #define _ASM_UML_STACKTRACE_H 4 5 #include <linux/uaccess.h> 6 #include <linux/ptrace.h> 7 8 struct stack_frame { 9 struct stack_frame *next_frame; 10 unsigned long return_address; 11 }; 12 13 struct stacktrace_ops { 14 void (*address)(void *data, unsigned l 15 }; 16 17 #ifdef CONFIG_FRAME_POINTER 18 static inline unsigned long 19 get_frame_pointer(struct task_struct *task, st 20 { 21 if (!task || task == current) 22 return segv_regs ? PT_REGS_BP( 23 return KSTK_EBP(task); 24 } 25 #else 26 static inline unsigned long 27 get_frame_pointer(struct task_struct *task, st 28 { 29 return 0; 30 } 31 #endif 32 33 static inline unsigned long 34 *get_stack_pointer(struct task_struct *task, s 35 { 36 if (!task || task == current) 37 return segv_regs ? (unsigned l 38 return (unsigned long *)KSTK_ESP(task) 39 } 40 41 void dump_trace(struct task_struct *tsk, const 42 43 #endif /* _ASM_UML_STACKTRACE_H */ 44
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.