xref: /openbmc/linux/arch/parisc/include/asm/ptrace.h (revision 527973c84077eb9273d0b2408655620de2e30136)
1deae26bfSKyle McMartin /* written by Philipp Rumpf, Copyright (C) 1999 SuSE GmbH Nuernberg
2deae26bfSKyle McMartin ** Copyright (C) 2000 Grant Grundler, Hewlett-Packard
3deae26bfSKyle McMartin */
470c1674fSDavid Howells #ifndef _PARISC_PTRACE_H
570c1674fSDavid Howells #define _PARISC_PTRACE_H
6deae26bfSKyle McMartin 
770c1674fSDavid Howells #include <uapi/asm/ptrace.h>
8deae26bfSKyle McMartin 
9deae26bfSKyle McMartin 
10deae26bfSKyle McMartin #define task_regs(task) ((struct pt_regs *) ((char *)(task) + TASK_REGS))
11deae26bfSKyle McMartin 
1281e192d6SHelge Deller #define arch_has_single_step()	1
1381e192d6SHelge Deller #define arch_has_block_step()	1
1481e192d6SHelge Deller 
15deae26bfSKyle McMartin /* XXX should we use iaoq[1] or iaoq[0] ? */
16deae26bfSKyle McMartin #define user_mode(regs)			(((regs)->iaoq[0] & 3) ? 1 : 0)
17deae26bfSKyle McMartin #define user_space(regs)		(((regs)->iasq[1] != 0) ? 1 : 0)
18deae26bfSKyle McMartin #define instruction_pointer(regs)	((regs)->iaoq[0] & ~3)
1940e03b68SKyle McMartin #define user_stack_pointer(regs)	((regs)->gr[30])
20deae26bfSKyle McMartin unsigned long profile_pc(struct pt_regs *);
2140e03b68SKyle McMartin 
22*527973c8SHelge Deller static inline unsigned long regs_return_value(struct pt_regs *regs)
23*527973c8SHelge Deller {
24*527973c8SHelge Deller 	return regs->gr[20];
25*527973c8SHelge Deller }
2640e03b68SKyle McMartin 
27deae26bfSKyle McMartin #endif
28