1 /* ptrace.h: ptrace() relevant definitions
3 * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
14 #include <asm/irq_regs.h>
15 #include <uapi/asm/ptrace.h>
17 #define in_syscall(regs) (((regs)->tbr & TBR_TT) == TBR_TT_TRAP0)
23 * we dedicate GR28 to keeping a pointer to the current exception frame
24 * - gr28 is destroyed on entry to the kernel from userspace
26 register struct pt_regs
*__frame
asm("gr28");
28 #define user_mode(regs) (!((regs)->psr & PSR_S))
29 #define instruction_pointer(regs) ((regs)->pc)
30 #define user_stack_pointer(regs) ((regs)->sp)
31 #define current_pt_regs() (__frame)
33 extern unsigned long user_stack(const struct pt_regs
*);
34 #define profile_pc(regs) ((regs)->pc)
36 #define task_pt_regs(task) ((task)->thread.frame0)
38 #define arch_has_single_step() (1)
40 #endif /* !__ASSEMBLY__ */
41 #endif /* _ASM_PTRACE_H */