linux/arch/blackfin/include/uapi/asm/ptrace.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
   2/*
   3 * Copyright 2004-2008 Analog Devices Inc.
   4 *
   5 * Licensed under the GPL-2 or later.
   6 */
   7
   8#ifndef _UAPI_BFIN_PTRACE_H
   9#define _UAPI_BFIN_PTRACE_H
  10
  11/*
  12 * GCC defines register number like this:
  13 * -----------------------------
  14 *       0 - 7 are data registers R0-R7
  15 *       8 - 15 are address registers P0-P7
  16 *      16 - 31 dsp registers I/B/L0 -- I/B/L3 & M0--M3
  17 *      32 - 33 A registers A0 & A1
  18 *      34 -    status register
  19 * -----------------------------
  20 *
  21 * We follows above, except:
  22 *      32-33 --- Low 32-bit of A0&1
  23 *      34-35 --- High 8-bit of A0&1
  24 */
  25
  26#ifndef __ASSEMBLY__
  27
  28struct task_struct;
  29
  30/* this struct defines the way the registers are stored on the
  31   stack during a system call. */
  32
  33struct pt_regs {
  34        long orig_pc;
  35        long ipend;
  36        long seqstat;
  37        long rete;
  38        long retn;
  39        long retx;
  40        long pc;                /* PC == RETI */
  41        long rets;
  42        long reserved;          /* Used as scratch during system calls */
  43        long astat;
  44        long lb1;
  45        long lb0;
  46        long lt1;
  47        long lt0;
  48        long lc1;
  49        long lc0;
  50        long a1w;
  51        long a1x;
  52        long a0w;
  53        long a0x;
  54        long b3;
  55        long b2;
  56        long b1;
  57        long b0;
  58        long l3;
  59        long l2;
  60        long l1;
  61        long l0;
  62        long m3;
  63        long m2;
  64        long m1;
  65        long m0;
  66        long i3;
  67        long i2;
  68        long i1;
  69        long i0;
  70        long usp;
  71        long fp;
  72        long p5;
  73        long p4;
  74        long p3;
  75        long p2;
  76        long p1;
  77        long p0;
  78        long r7;
  79        long r6;
  80        long r5;
  81        long r4;
  82        long r3;
  83        long r2;
  84        long r1;
  85        long r0;
  86        long orig_r0;
  87        long orig_p0;
  88        long syscfg;
  89};
  90
  91/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
  92#define PTRACE_GETREGS            12
  93#define PTRACE_SETREGS            13    /* ptrace signal  */
  94
  95#define PTRACE_GETFDPIC           31    /* get the ELF fdpic loadmap address */
  96#define PTRACE_GETFDPIC_EXEC       0    /* [addr] request the executable loadmap */
  97#define PTRACE_GETFDPIC_INTERP     1    /* [addr] request the interpreter loadmap */
  98
  99#define PS_S  (0x0002)
 100
 101
 102#endif                          /* __ASSEMBLY__ */
 103
 104/*
 105 * Offsets used by 'ptrace' system call interface.
 106 */
 107
 108#define PT_R0 204
 109#define PT_R1 200
 110#define PT_R2 196
 111#define PT_R3 192
 112#define PT_R4 188
 113#define PT_R5 184
 114#define PT_R6 180
 115#define PT_R7 176
 116#define PT_P0 172
 117#define PT_P1 168
 118#define PT_P2 164
 119#define PT_P3 160
 120#define PT_P4 156
 121#define PT_P5 152
 122#define PT_FP 148
 123#define PT_USP 144
 124#define PT_I0 140
 125#define PT_I1 136
 126#define PT_I2 132
 127#define PT_I3 128
 128#define PT_M0 124
 129#define PT_M1 120
 130#define PT_M2 116
 131#define PT_M3 112
 132#define PT_L0 108
 133#define PT_L1 104
 134#define PT_L2 100
 135#define PT_L3 96
 136#define PT_B0 92
 137#define PT_B1 88
 138#define PT_B2 84
 139#define PT_B3 80
 140#define PT_A0X 76
 141#define PT_A0W 72
 142#define PT_A1X 68
 143#define PT_A1W 64
 144#define PT_LC0 60
 145#define PT_LC1 56
 146#define PT_LT0 52
 147#define PT_LT1 48
 148#define PT_LB0 44
 149#define PT_LB1 40
 150#define PT_ASTAT 36
 151#define PT_RESERVED 32
 152#define PT_RETS 28
 153#define PT_PC 24
 154#define PT_RETX 20
 155#define PT_RETN 16
 156#define PT_RETE 12
 157#define PT_SEQSTAT 8
 158#define PT_IPEND 4
 159
 160#define PT_ORIG_R0 208
 161#define PT_ORIG_P0 212
 162#define PT_SYSCFG 216
 163#define PT_TEXT_ADDR 220
 164#define PT_TEXT_END_ADDR 224
 165#define PT_DATA_ADDR 228
 166#define PT_FDPIC_EXEC 232
 167#define PT_FDPIC_INTERP 236
 168
 169#define PT_LAST_PSEUDO PT_FDPIC_INTERP
 170
 171#endif /* _UAPI_BFIN_PTRACE_H */
 172