1 /* MN10300 Exception frame layout and ptrace constants
3 * Copyright (C) 2007 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 Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
45 * This defines the way registers are stored in the event of an exception
46 * - the strange order is due to the MOVM instruction
49 unsigned long a3
; /* syscall arg 3 */
50 unsigned long a2
; /* syscall arg 4 */
51 unsigned long d3
; /* syscall arg 5 */
52 unsigned long d2
; /* syscall arg 6 */
70 unsigned long a0
; /* syscall arg 1 */
71 unsigned long d1
; /* syscall arg 2 */
72 unsigned long d0
; /* syscall ret */
73 struct pt_regs
*next
; /* next frame pointer */
74 unsigned long orig_d0
; /* syscall number */
80 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
81 #define PTRACE_GETREGS 12
82 #define PTRACE_SETREGS 13
83 #define PTRACE_GETFPREGS 14
84 #define PTRACE_SETFPREGS 15
86 /* options set using PTRACE_SETOPTIONS */
87 #define PTRACE_O_TRACESYSGOOD 0x00000001
89 #if defined(__KERNEL__)
91 extern struct pt_regs
*__frame
; /* current frame pointer */
93 #if !defined(__ASSEMBLY__)
96 #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL)
97 #define instruction_pointer(regs) ((regs)->pc)
98 #define user_stack_pointer(regs) ((regs)->sp)
99 extern void show_regs(struct pt_regs
*);
101 #define arch_has_single_step() (1)
102 extern void user_enable_single_step(struct task_struct
*);
103 extern void user_disable_single_step(struct task_struct
*);
105 #endif /* !__ASSEMBLY */
107 #define profile_pc(regs) ((regs)->pc)
109 #endif /* __KERNEL__ */
110 #endif /* _ASM_PTRACE_H */