| * Copyright (C) 2006 Atmark Techno, Inc. |
| * This file is subject to the terms and conditions of the GNU General Public |
| * License. See the file "COPYING" in the main directory of this archive |
| #ifndef _ASM_MICROBLAZE_PTRACE_H |
| #define _ASM_MICROBLAZE_PTRACE_H |
| typedef unsigned long microblaze_reg_t; |
| #define kernel_mode(regs) ((regs)->pt_mode) |
| #define user_mode(regs) (!kernel_mode(regs)) |
| #define instruction_pointer(regs) ((regs)->pc) |
| #define profile_pc(regs) instruction_pointer(regs) |
| static inline long regs_return_value(struct pt_regs *regs) |
| /* pt_regs offsets used by gdbserver etc in ptrace syscalls */ |
| #define PT_GPR(n) ((n) * sizeof(microblaze_reg_t)) |
| #define PT_PC (32 * sizeof(microblaze_reg_t)) |
| #define PT_MSR (33 * sizeof(microblaze_reg_t)) |
| #define PT_EAR (34 * sizeof(microblaze_reg_t)) |
| #define PT_ESR (35 * sizeof(microblaze_reg_t)) |
| #define PT_FSR (36 * sizeof(microblaze_reg_t)) |
| #define PT_KERNEL_MODE (37 * sizeof(microblaze_reg_t)) |
| #endif /* __ASSEMBLY__ */ |
| #endif /* _ASM_MICROBLAZE_PTRACE_H */ |