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