| 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 |  | 
 | 7 | typedef struct { | 
| Dan Smith | eaf1b6f | 2009-03-26 15:24:40 +0100 | [diff] [blame] | 8 | 	__u32 cr[NUM_CR_WORDS]; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | } per_cr_words32; | 
 | 10 |  | 
 | 11 | typedef struct { | 
 | 12 | 	__u16          perc_atmid;          /* 0x096 */ | 
 | 13 | 	__u32          address;             /* 0x098 */ | 
 | 14 | 	__u8           access_id;           /* 0x0a1 */ | 
 | 15 | } per_lowcore_words32; | 
 | 16 |  | 
 | 17 | typedef struct { | 
 | 18 | 	union { | 
 | 19 | 		per_cr_words32   words; | 
 | 20 | 	} control_regs; | 
 | 21 | 	/* | 
 | 22 | 	 * Use these flags instead of setting em_instruction_fetch | 
 | 23 | 	 * directly they are used so that single stepping can be | 
 | 24 | 	 * switched on & off while not affecting other tracing | 
 | 25 | 	 */ | 
 | 26 | 	unsigned  single_step       : 1; | 
 | 27 | 	unsigned  instruction_fetch : 1; | 
 | 28 | 	unsigned                    : 30; | 
 | 29 | 	/* | 
 | 30 | 	 * These addresses are copied into cr10 & cr11 if single | 
 | 31 | 	 * stepping is switched off | 
 | 32 | 	 */ | 
 | 33 | 	__u32     starting_addr; | 
 | 34 | 	__u32     ending_addr; | 
 | 35 | 	union { | 
 | 36 | 		per_lowcore_words32 words; | 
 | 37 | 	} lowcore;  | 
 | 38 | } per_struct32; | 
 | 39 |  | 
 | 40 | struct user_regs_struct32 | 
 | 41 | { | 
| Martin Schwidefsky | 63506c4 | 2008-07-14 09:58:54 +0200 | [diff] [blame] | 42 | 	psw_compat_t psw; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | 	u32 gprs[NUM_GPRS]; | 
 | 44 | 	u32 acrs[NUM_ACRS]; | 
 | 45 | 	u32 orig_gpr2; | 
| Jarod Wilson | 3d6e48f | 2008-09-09 12:38:56 +0200 | [diff] [blame] | 46 | 	/* nb: there's a 4-byte hole here */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | 	s390_fp_regs fp_regs; | 
 | 48 | 	/* | 
 | 49 | 	 * These per registers are in here so that gdb can modify them | 
 | 50 | 	 * itself as there is no "official" ptrace interface for hardware | 
 | 51 | 	 * watchpoints. This is the way intel does it. | 
 | 52 | 	 */ | 
 | 53 | 	per_struct32 per_info; | 
 | 54 | 	u32  ieee_instruction_pointer;  | 
 | 55 | 	/* Used to give failing instruction back to user for ieee exceptions */ | 
 | 56 | }; | 
 | 57 |  | 
 | 58 | struct user32 { | 
 | 59 | 	/* We start with the registers, to mimic the way that "memory" | 
 | 60 | 	   is returned from the ptrace(3,...) function.  */ | 
 | 61 | 	struct user_regs_struct32 regs; /* Where the registers are actually stored */ | 
 | 62 | 	/* The rest of this junk is to help gdb figure out what goes where */ | 
 | 63 | 	u32 u_tsize;		/* Text segment size (pages). */ | 
 | 64 | 	u32 u_dsize;	        /* Data segment size (pages). */ | 
 | 65 | 	u32 u_ssize;	        /* Stack segment size (pages). */ | 
 | 66 | 	u32 start_code;         /* Starting virtual address of text. */ | 
 | 67 | 	u32 start_stack;	/* Starting virtual address of stack area. | 
 | 68 | 				   This is actually the bottom of the stack, | 
 | 69 | 				   the top of the stack is always found in the | 
 | 70 | 				   esp register.  */ | 
 | 71 | 	s32 signal;     	 /* Signal that caused the core dump. */ | 
 | 72 | 	u32 u_ar0;               /* Used by gdb to help find the values for */ | 
 | 73 | 	                         /* the registers. */ | 
 | 74 | 	u32 magic;		 /* To uniquely identify a core file */ | 
 | 75 | 	char u_comm[32];	 /* User command that was responsible */ | 
 | 76 | }; | 
 | 77 |  | 
 | 78 | typedef struct | 
 | 79 | { | 
 | 80 | 	__u32   len; | 
 | 81 | 	__u32   kernel_addr; | 
 | 82 | 	__u32   process_addr; | 
 | 83 | } ptrace_area_emu31; | 
 | 84 |  | 
 | 85 | #endif /* _PTRACE32_H */ |