| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _PTRACE32_H | 
 | 2 | #define _PTRACE32_H | 
 | 3 |  | 
| Dan Smith | eaf1b6f | 2009-03-26 15:24:40 +0100 | [diff] [blame] | 4 | #include <asm/ptrace.h>    /* needed for NUM_CR_WORDS */ | 
| Martin Schwidefsky | 63506c4 | 2008-07-14 09:58:54 +0200 | [diff] [blame] | 5 | #include "compat_linux.h"  /* needed for psw_compat_t */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 |  | 
| Martin Schwidefsky | 5e9a269 | 2011-01-05 12:48:10 +0100 | [diff] [blame] | 7 | struct compat_per_struct_kernel { | 
 | 8 | 	__u32 cr9;		/* PER control bits */ | 
 | 9 | 	__u32 cr10;		/* PER starting address */ | 
 | 10 | 	__u32 cr11;		/* PER ending address */ | 
 | 11 | 	__u32 bits;		/* Obsolete software bits */ | 
 | 12 | 	__u32 starting_addr;	/* User specified start address */ | 
 | 13 | 	__u32 ending_addr;	/* User specified end address */ | 
 | 14 | 	__u16 perc_atmid;	/* PER trap ATMID */ | 
 | 15 | 	__u32 address;		/* PER trap instruction address */ | 
 | 16 | 	__u8  access_id;	/* PER trap access identification */ | 
 | 17 | }; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 |  | 
| Martin Schwidefsky | 5e9a269 | 2011-01-05 12:48:10 +0100 | [diff] [blame] | 19 | struct compat_user_regs_struct | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | { | 
| Martin Schwidefsky | 63506c4 | 2008-07-14 09:58:54 +0200 | [diff] [blame] | 21 | 	psw_compat_t psw; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | 	u32 gprs[NUM_GPRS]; | 
 | 23 | 	u32 acrs[NUM_ACRS]; | 
 | 24 | 	u32 orig_gpr2; | 
| Jarod Wilson | 3d6e48f | 2008-09-09 12:38:56 +0200 | [diff] [blame] | 25 | 	/* nb: there's a 4-byte hole here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | 	s390_fp_regs fp_regs; | 
 | 27 | 	/* | 
 | 28 | 	 * These per registers are in here so that gdb can modify them | 
 | 29 | 	 * itself as there is no "official" ptrace interface for hardware | 
 | 30 | 	 * watchpoints. This is the way intel does it. | 
 | 31 | 	 */ | 
| Martin Schwidefsky | 5e9a269 | 2011-01-05 12:48:10 +0100 | [diff] [blame] | 32 | 	struct compat_per_struct_kernel per_info; | 
| Martin Schwidefsky | ba6cadf | 2010-10-25 16:10:41 +0200 | [diff] [blame] | 33 | 	u32  ieee_instruction_pointer;	/* obsolete, always 0 */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | }; | 
 | 35 |  | 
| Martin Schwidefsky | 5e9a269 | 2011-01-05 12:48:10 +0100 | [diff] [blame] | 36 | struct compat_user { | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | 	/* We start with the registers, to mimic the way that "memory" | 
 | 38 | 	   is returned from the ptrace(3,...) function.  */ | 
| Martin Schwidefsky | 5e9a269 | 2011-01-05 12:48:10 +0100 | [diff] [blame] | 39 | 	struct compat_user_regs_struct regs; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | 	/* The rest of this junk is to help gdb figure out what goes where */ | 
 | 41 | 	u32 u_tsize;		/* Text segment size (pages). */ | 
 | 42 | 	u32 u_dsize;	        /* Data segment size (pages). */ | 
 | 43 | 	u32 u_ssize;	        /* Stack segment size (pages). */ | 
 | 44 | 	u32 start_code;         /* Starting virtual address of text. */ | 
 | 45 | 	u32 start_stack;	/* Starting virtual address of stack area. | 
 | 46 | 				   This is actually the bottom of the stack, | 
 | 47 | 				   the top of the stack is always found in the | 
 | 48 | 				   esp register.  */ | 
 | 49 | 	s32 signal;     	 /* Signal that caused the core dump. */ | 
 | 50 | 	u32 u_ar0;               /* Used by gdb to help find the values for */ | 
 | 51 | 	                         /* the registers. */ | 
 | 52 | 	u32 magic;		 /* To uniquely identify a core file */ | 
 | 53 | 	char u_comm[32];	 /* User command that was responsible */ | 
 | 54 | }; | 
 | 55 |  | 
 | 56 | typedef struct | 
 | 57 | { | 
 | 58 | 	__u32   len; | 
 | 59 | 	__u32   kernel_addr; | 
 | 60 | 	__u32   process_addr; | 
| Martin Schwidefsky | 5e9a269 | 2011-01-05 12:48:10 +0100 | [diff] [blame] | 61 | } compat_ptrace_area; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 |  | 
 | 63 | #endif /* _PTRACE32_H */ |