Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _PTRACE32_H
0003 #define _PTRACE32_H
0004 
0005 #include <asm/ptrace.h>    /* needed for NUM_CR_WORDS */
0006 #include "compat_linux.h"  /* needed for psw_compat_t */
0007 
0008 struct compat_per_struct_kernel {
0009     __u32 cr9;      /* PER control bits */
0010     __u32 cr10;     /* PER starting address */
0011     __u32 cr11;     /* PER ending address */
0012     __u32 bits;     /* Obsolete software bits */
0013     __u32 starting_addr;    /* User specified start address */
0014     __u32 ending_addr;  /* User specified end address */
0015     __u16 perc_atmid;   /* PER trap ATMID */
0016     __u32 address;      /* PER trap instruction address */
0017     __u8  access_id;    /* PER trap access identification */
0018 };
0019 
0020 struct compat_user_regs_struct
0021 {
0022     psw_compat_t psw;
0023     u32 gprs[NUM_GPRS];
0024     u32 acrs[NUM_ACRS];
0025     u32 orig_gpr2;
0026     /* nb: there's a 4-byte hole here */
0027     s390_fp_regs fp_regs;
0028     /*
0029      * These per registers are in here so that gdb can modify them
0030      * itself as there is no "official" ptrace interface for hardware
0031      * watchpoints. This is the way intel does it.
0032      */
0033     struct compat_per_struct_kernel per_info;
0034     u32  ieee_instruction_pointer;  /* obsolete, always 0 */
0035 };
0036 
0037 struct compat_user {
0038     /* We start with the registers, to mimic the way that "memory"
0039        is returned from the ptrace(3,...) function.  */
0040     struct compat_user_regs_struct regs;
0041     /* The rest of this junk is to help gdb figure out what goes where */
0042     u32 u_tsize;        /* Text segment size (pages). */
0043     u32 u_dsize;            /* Data segment size (pages). */
0044     u32 u_ssize;            /* Stack segment size (pages). */
0045     u32 start_code;         /* Starting virtual address of text. */
0046     u32 start_stack;    /* Starting virtual address of stack area.
0047                    This is actually the bottom of the stack,
0048                    the top of the stack is always found in the
0049                    esp register.  */
0050     s32 signal;          /* Signal that caused the core dump. */
0051     u32 u_ar0;               /* Used by gdb to help find the values for */
0052                              /* the registers. */
0053     u32 magic;       /* To uniquely identify a core file */
0054     char u_comm[32];     /* User command that was responsible */
0055 };
0056 
0057 typedef struct
0058 {
0059     __u32   len;
0060     __u32   kernel_addr;
0061     __u32   process_addr;
0062 } compat_ptrace_area;
0063 
0064 #endif /* _PTRACE32_H */