2 * Copyright (C) 2006 Atmark Techno, Inc.
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
9 #ifndef _ASM_MICROBLAZE_PTRACE_H
10 #define _ASM_MICROBLAZE_PTRACE_H
14 typedef unsigned long microblaze_reg_t
;
58 #define kernel_mode(regs) ((regs)->pt_mode)
59 #define user_mode(regs) (!kernel_mode(regs))
61 #define instruction_pointer(regs) ((regs)->pc)
62 #define profile_pc(regs) instruction_pointer(regs)
64 #else /* __KERNEL__ */
66 /* pt_regs offsets used by gdbserver etc in ptrace syscalls */
67 #define PT_GPR(n) ((n) * sizeof(microblaze_reg_t))
68 #define PT_PC (32 * sizeof(microblaze_reg_t))
69 #define PT_MSR (33 * sizeof(microblaze_reg_t))
70 #define PT_EAR (34 * sizeof(microblaze_reg_t))
71 #define PT_ESR (35 * sizeof(microblaze_reg_t))
72 #define PT_FSR (36 * sizeof(microblaze_reg_t))
73 #define PT_KERNEL_MODE (37 * sizeof(microblaze_reg_t))
77 #endif /* __ASSEMBLY__ */
79 #endif /* _ASM_MICROBLAZE_PTRACE_H */