forked from luck/tmp_suning_uos_patched
microblaze: Add PT_ macros for special purpose regs
PT_ macros are used by gdb and strace uses them too. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
4a3bb9a900
commit
90974cb4cc
|
@ -54,6 +54,7 @@ struct pt_regs {
|
|||
int pt_mode;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#define kernel_mode(regs) ((regs)->pt_mode)
|
||||
#define user_mode(regs) (!kernel_mode(regs))
|
||||
|
||||
|
@ -62,6 +63,19 @@ struct pt_regs {
|
|||
|
||||
void show_regs(struct pt_regs *);
|
||||
|
||||
#else /* __KERNEL__ */
|
||||
|
||||
/* 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 /* __KERNEL */
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_MICROBLAZE_PTRACE_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user