| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * linux/include/asm-m32r/ptrace.h | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * 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 | 
					
						
							|  |  |  |  * for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * M32R version: | 
					
						
							|  |  |  |  *   Copyright (C) 2001-2002, 2004  Hirokazu Takata <takata at linux-m32r.org> | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2012-12-19 16:07:18 +00:00
										 |  |  | #ifndef _ASM_M32R_PTRACE_H
 | 
					
						
							|  |  |  | #define _ASM_M32R_PTRACE_H
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-11-07 00:59:47 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-09-17 08:39:39 +01:00
										 |  |  | #include <asm/m32r.h>		/* M32R_PSW_BSM, M32R_PSW_BPM */
 | 
					
						
							| 
									
										
										
										
											2012-12-19 16:07:18 +00:00
										 |  |  | #include <uapi/asm/ptrace.h>
 | 
					
						
							| 
									
										
										
										
											2006-09-17 08:39:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-10 15:23:01 -08:00
										 |  |  | #define arch_has_single_step() (1)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-10-16 01:26:37 -07:00
										 |  |  | struct task_struct; | 
					
						
							|  |  |  | extern void init_debug_traps(struct task_struct *); | 
					
						
							|  |  |  | #define arch_ptrace_attach(child) \
 | 
					
						
							|  |  |  | 	init_debug_traps(child) | 
					
						
							| 
									
										
										
										
											2005-11-07 00:59:47 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #if defined(CONFIG_ISA_M32R2) || defined(CONFIG_CHIP_VDEC2)
 | 
					
						
							|  |  |  | #define user_mode(regs) ((M32R_PSW_BPM & (regs)->psw) != 0)
 | 
					
						
							|  |  |  | #elif defined(CONFIG_ISA_M32R)
 | 
					
						
							|  |  |  | #define user_mode(regs) ((M32R_PSW_BSM & (regs)->psw) != 0)
 | 
					
						
							|  |  |  | #else
 | 
					
						
							|  |  |  | #error unknown isa configuration
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define instruction_pointer(regs) ((regs)->bpc)
 | 
					
						
							|  |  |  | #define profile_pc(regs) instruction_pointer(regs)
 | 
					
						
							| 
									
										
										
										
											2012-12-14 01:50:19 -05:00
										 |  |  | #define user_stack_pointer(regs) ((regs)->spu)
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | extern void withdraw_debug_trap(struct pt_regs *regs); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-01-12 01:05:52 -08:00
										 |  |  | #define task_pt_regs(task) \
 | 
					
						
							|  |  |  |         ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE) - 1) | 
					
						
							| 
									
										
										
										
											2012-10-15 16:37:12 -04:00
										 |  |  | #define current_pt_regs() ((struct pt_regs *) \
 | 
					
						
							|  |  |  | 	((unsigned long)current_thread_info() + THREAD_SIZE) - 1) | 
					
						
							| 
									
										
										
										
											2006-01-12 01:05:52 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #endif /* _ASM_M32R_PTRACE_H */
 |