(root)/
strace-6.5/
src/
xlat/
compat_ptrace_cmds.h
       1  /* Generated by ./src/xlat/gen.sh from ./src/xlat/compat_ptrace_cmds.in; do not edit. */
       2  
       3  #include "gcc_compat.h"
       4  #include "static_assert.h"
       5  
       6  #if defined __arm64__ || defined __aarch64__
       7  #if defined(COMPAT_PTRACE_GETREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETREGS) && HAVE_DECL_COMPAT_PTRACE_GETREGS)
       8  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
       9  static_assert((COMPAT_PTRACE_GETREGS) == (12), "COMPAT_PTRACE_GETREGS != 12");
      10  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
      11  #else
      12  # define COMPAT_PTRACE_GETREGS 12
      13  #endif
      14  #if defined(COMPAT_PTRACE_GETREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETREGS) && HAVE_DECL_COMPAT_PTRACE_GETREGS)
      15  #if defined XLAT_PREV_VAL
      16  static_assert((unsigned long long) (COMPAT_PTRACE_GETREGS)
      17        > (unsigned long long) (XLAT_PREV_VAL),
      18        "Incorrect order in #sorted xlat: COMPAT_PTRACE_GETREGS"
      19        " is not larger than the previous value");
      20  #endif
      21  #undef XLAT_PREV_VAL
      22  #define XLAT_PREV_VAL (COMPAT_PTRACE_GETREGS)
      23  #endif
      24  #if defined(COMPAT_PTRACE_SETREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETREGS) && HAVE_DECL_COMPAT_PTRACE_SETREGS)
      25  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      26  static_assert((COMPAT_PTRACE_SETREGS) == (13), "COMPAT_PTRACE_SETREGS != 13");
      27  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
      28  #else
      29  # define COMPAT_PTRACE_SETREGS 13
      30  #endif
      31  #if defined(COMPAT_PTRACE_SETREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETREGS) && HAVE_DECL_COMPAT_PTRACE_SETREGS)
      32  #if defined XLAT_PREV_VAL
      33  static_assert((unsigned long long) (COMPAT_PTRACE_SETREGS)
      34        > (unsigned long long) (XLAT_PREV_VAL),
      35        "Incorrect order in #sorted xlat: COMPAT_PTRACE_SETREGS"
      36        " is not larger than the previous value");
      37  #endif
      38  #undef XLAT_PREV_VAL
      39  #define XLAT_PREV_VAL (COMPAT_PTRACE_SETREGS)
      40  #endif
      41  #if defined(COMPAT_PTRACE_GETFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETFPREGS) && HAVE_DECL_COMPAT_PTRACE_GETFPREGS)
      42  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      43  static_assert((COMPAT_PTRACE_GETFPREGS) == (14), "COMPAT_PTRACE_GETFPREGS != 14");
      44  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
      45  #else
      46  # define COMPAT_PTRACE_GETFPREGS 14
      47  #endif
      48  #if defined(COMPAT_PTRACE_GETFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETFPREGS) && HAVE_DECL_COMPAT_PTRACE_GETFPREGS)
      49  #if defined XLAT_PREV_VAL
      50  static_assert((unsigned long long) (COMPAT_PTRACE_GETFPREGS)
      51        > (unsigned long long) (XLAT_PREV_VAL),
      52        "Incorrect order in #sorted xlat: COMPAT_PTRACE_GETFPREGS"
      53        " is not larger than the previous value");
      54  #endif
      55  #undef XLAT_PREV_VAL
      56  #define XLAT_PREV_VAL (COMPAT_PTRACE_GETFPREGS)
      57  #endif
      58  #if defined(COMPAT_PTRACE_SETFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETFPREGS) && HAVE_DECL_COMPAT_PTRACE_SETFPREGS)
      59  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      60  static_assert((COMPAT_PTRACE_SETFPREGS) == (15), "COMPAT_PTRACE_SETFPREGS != 15");
      61  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
      62  #else
      63  # define COMPAT_PTRACE_SETFPREGS 15
      64  #endif
      65  #if defined(COMPAT_PTRACE_SETFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETFPREGS) && HAVE_DECL_COMPAT_PTRACE_SETFPREGS)
      66  #if defined XLAT_PREV_VAL
      67  static_assert((unsigned long long) (COMPAT_PTRACE_SETFPREGS)
      68        > (unsigned long long) (XLAT_PREV_VAL),
      69        "Incorrect order in #sorted xlat: COMPAT_PTRACE_SETFPREGS"
      70        " is not larger than the previous value");
      71  #endif
      72  #undef XLAT_PREV_VAL
      73  #define XLAT_PREV_VAL (COMPAT_PTRACE_SETFPREGS)
      74  #endif
      75  #if defined(COMPAT_PTRACE_GET_THREAD_AREA) || (defined(HAVE_DECL_COMPAT_PTRACE_GET_THREAD_AREA) && HAVE_DECL_COMPAT_PTRACE_GET_THREAD_AREA)
      76  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      77  static_assert((COMPAT_PTRACE_GET_THREAD_AREA) == (22), "COMPAT_PTRACE_GET_THREAD_AREA != 22");
      78  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
      79  #else
      80  # define COMPAT_PTRACE_GET_THREAD_AREA 22
      81  #endif
      82  #if defined(COMPAT_PTRACE_GET_THREAD_AREA) || (defined(HAVE_DECL_COMPAT_PTRACE_GET_THREAD_AREA) && HAVE_DECL_COMPAT_PTRACE_GET_THREAD_AREA)
      83  #if defined XLAT_PREV_VAL
      84  static_assert((unsigned long long) (COMPAT_PTRACE_GET_THREAD_AREA)
      85        > (unsigned long long) (XLAT_PREV_VAL),
      86        "Incorrect order in #sorted xlat: COMPAT_PTRACE_GET_THREAD_AREA"
      87        " is not larger than the previous value");
      88  #endif
      89  #undef XLAT_PREV_VAL
      90  #define XLAT_PREV_VAL (COMPAT_PTRACE_GET_THREAD_AREA)
      91  #endif
      92  #if defined(COMPAT_PTRACE_SET_SYSCALL) || (defined(HAVE_DECL_COMPAT_PTRACE_SET_SYSCALL) && HAVE_DECL_COMPAT_PTRACE_SET_SYSCALL)
      93  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
      94  static_assert((COMPAT_PTRACE_SET_SYSCALL) == (23), "COMPAT_PTRACE_SET_SYSCALL != 23");
      95  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
      96  #else
      97  # define COMPAT_PTRACE_SET_SYSCALL 23
      98  #endif
      99  #if defined(COMPAT_PTRACE_SET_SYSCALL) || (defined(HAVE_DECL_COMPAT_PTRACE_SET_SYSCALL) && HAVE_DECL_COMPAT_PTRACE_SET_SYSCALL)
     100  #if defined XLAT_PREV_VAL
     101  static_assert((unsigned long long) (COMPAT_PTRACE_SET_SYSCALL)
     102        > (unsigned long long) (XLAT_PREV_VAL),
     103        "Incorrect order in #sorted xlat: COMPAT_PTRACE_SET_SYSCALL"
     104        " is not larger than the previous value");
     105  #endif
     106  #undef XLAT_PREV_VAL
     107  #define XLAT_PREV_VAL (COMPAT_PTRACE_SET_SYSCALL)
     108  #endif
     109  #if defined(COMPAT_PTRACE_GETVFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETVFPREGS) && HAVE_DECL_COMPAT_PTRACE_GETVFPREGS)
     110  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     111  static_assert((COMPAT_PTRACE_GETVFPREGS) == (27), "COMPAT_PTRACE_GETVFPREGS != 27");
     112  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     113  #else
     114  # define COMPAT_PTRACE_GETVFPREGS 27
     115  #endif
     116  #if defined(COMPAT_PTRACE_GETVFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETVFPREGS) && HAVE_DECL_COMPAT_PTRACE_GETVFPREGS)
     117  #if defined XLAT_PREV_VAL
     118  static_assert((unsigned long long) (COMPAT_PTRACE_GETVFPREGS)
     119        > (unsigned long long) (XLAT_PREV_VAL),
     120        "Incorrect order in #sorted xlat: COMPAT_PTRACE_GETVFPREGS"
     121        " is not larger than the previous value");
     122  #endif
     123  #undef XLAT_PREV_VAL
     124  #define XLAT_PREV_VAL (COMPAT_PTRACE_GETVFPREGS)
     125  #endif
     126  #if defined(COMPAT_PTRACE_SETVFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETVFPREGS) && HAVE_DECL_COMPAT_PTRACE_SETVFPREGS)
     127  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     128  static_assert((COMPAT_PTRACE_SETVFPREGS) == (28), "COMPAT_PTRACE_SETVFPREGS != 28");
     129  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     130  #else
     131  # define COMPAT_PTRACE_SETVFPREGS 28
     132  #endif
     133  #if defined(COMPAT_PTRACE_SETVFPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETVFPREGS) && HAVE_DECL_COMPAT_PTRACE_SETVFPREGS)
     134  #if defined XLAT_PREV_VAL
     135  static_assert((unsigned long long) (COMPAT_PTRACE_SETVFPREGS)
     136        > (unsigned long long) (XLAT_PREV_VAL),
     137        "Incorrect order in #sorted xlat: COMPAT_PTRACE_SETVFPREGS"
     138        " is not larger than the previous value");
     139  #endif
     140  #undef XLAT_PREV_VAL
     141  #define XLAT_PREV_VAL (COMPAT_PTRACE_SETVFPREGS)
     142  #endif
     143  #if defined(COMPAT_PTRACE_GETHBPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETHBPREGS) && HAVE_DECL_COMPAT_PTRACE_GETHBPREGS)
     144  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     145  static_assert((COMPAT_PTRACE_GETHBPREGS) == (29), "COMPAT_PTRACE_GETHBPREGS != 29");
     146  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     147  #else
     148  # define COMPAT_PTRACE_GETHBPREGS 29
     149  #endif
     150  #if defined(COMPAT_PTRACE_GETHBPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_GETHBPREGS) && HAVE_DECL_COMPAT_PTRACE_GETHBPREGS)
     151  #if defined XLAT_PREV_VAL
     152  static_assert((unsigned long long) (COMPAT_PTRACE_GETHBPREGS)
     153        > (unsigned long long) (XLAT_PREV_VAL),
     154        "Incorrect order in #sorted xlat: COMPAT_PTRACE_GETHBPREGS"
     155        " is not larger than the previous value");
     156  #endif
     157  #undef XLAT_PREV_VAL
     158  #define XLAT_PREV_VAL (COMPAT_PTRACE_GETHBPREGS)
     159  #endif
     160  #if defined(COMPAT_PTRACE_SETHBPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETHBPREGS) && HAVE_DECL_COMPAT_PTRACE_SETHBPREGS)
     161  DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
     162  static_assert((COMPAT_PTRACE_SETHBPREGS) == (30), "COMPAT_PTRACE_SETHBPREGS != 30");
     163  DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
     164  #else
     165  # define COMPAT_PTRACE_SETHBPREGS 30
     166  #endif
     167  #if defined(COMPAT_PTRACE_SETHBPREGS) || (defined(HAVE_DECL_COMPAT_PTRACE_SETHBPREGS) && HAVE_DECL_COMPAT_PTRACE_SETHBPREGS)
     168  #if defined XLAT_PREV_VAL
     169  static_assert((unsigned long long) (COMPAT_PTRACE_SETHBPREGS)
     170        > (unsigned long long) (XLAT_PREV_VAL),
     171        "Incorrect order in #sorted xlat: COMPAT_PTRACE_SETHBPREGS"
     172        " is not larger than the previous value");
     173  #endif
     174  #undef XLAT_PREV_VAL
     175  #define XLAT_PREV_VAL (COMPAT_PTRACE_SETHBPREGS)
     176  #endif
     177  #endif
     178  #undef XLAT_PREV_VAL
     179  
     180  #ifndef XLAT_MACROS_ONLY
     181  
     182  # ifdef IN_MPERS
     183  
     184  #  error static const struct xlat compat_ptrace_cmds in mpers mode
     185  
     186  # else
     187  
     188  DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
     189  static const struct xlat_data compat_ptrace_cmds_xdata[] = {
     190  #if defined __arm64__ || defined __aarch64__
     191   XLAT(COMPAT_PTRACE_GETREGS),
     192   #define XLAT_VAL_0 ((unsigned) (COMPAT_PTRACE_GETREGS))
     193   #define XLAT_STR_0 STRINGIFY(COMPAT_PTRACE_GETREGS)
     194   XLAT(COMPAT_PTRACE_SETREGS),
     195   #define XLAT_VAL_1 ((unsigned) (COMPAT_PTRACE_SETREGS))
     196   #define XLAT_STR_1 STRINGIFY(COMPAT_PTRACE_SETREGS)
     197  
     198  /*
     199  * These two are not defined in arch/arm64/include/asm/ptrace.h,
     200  * but we still support decoding of PTRACE_[GS]ETFPREGS for m32 tracees.
     201  */
     202   XLAT(COMPAT_PTRACE_GETFPREGS),
     203   #define XLAT_VAL_2 ((unsigned) (COMPAT_PTRACE_GETFPREGS))
     204   #define XLAT_STR_2 STRINGIFY(COMPAT_PTRACE_GETFPREGS)
     205   XLAT(COMPAT_PTRACE_SETFPREGS),
     206   #define XLAT_VAL_3 ((unsigned) (COMPAT_PTRACE_SETFPREGS))
     207   #define XLAT_STR_3 STRINGIFY(COMPAT_PTRACE_SETFPREGS)
     208  
     209   XLAT(COMPAT_PTRACE_GET_THREAD_AREA),
     210   #define XLAT_VAL_4 ((unsigned) (COMPAT_PTRACE_GET_THREAD_AREA))
     211   #define XLAT_STR_4 STRINGIFY(COMPAT_PTRACE_GET_THREAD_AREA)
     212   XLAT(COMPAT_PTRACE_SET_SYSCALL),
     213   #define XLAT_VAL_5 ((unsigned) (COMPAT_PTRACE_SET_SYSCALL))
     214   #define XLAT_STR_5 STRINGIFY(COMPAT_PTRACE_SET_SYSCALL)
     215   XLAT(COMPAT_PTRACE_GETVFPREGS),
     216   #define XLAT_VAL_6 ((unsigned) (COMPAT_PTRACE_GETVFPREGS))
     217   #define XLAT_STR_6 STRINGIFY(COMPAT_PTRACE_GETVFPREGS)
     218   XLAT(COMPAT_PTRACE_SETVFPREGS),
     219   #define XLAT_VAL_7 ((unsigned) (COMPAT_PTRACE_SETVFPREGS))
     220   #define XLAT_STR_7 STRINGIFY(COMPAT_PTRACE_SETVFPREGS)
     221   XLAT(COMPAT_PTRACE_GETHBPREGS),
     222   #define XLAT_VAL_8 ((unsigned) (COMPAT_PTRACE_GETHBPREGS))
     223   #define XLAT_STR_8 STRINGIFY(COMPAT_PTRACE_GETHBPREGS)
     224   XLAT(COMPAT_PTRACE_SETHBPREGS),
     225   #define XLAT_VAL_9 ((unsigned) (COMPAT_PTRACE_SETHBPREGS))
     226   #define XLAT_STR_9 STRINGIFY(COMPAT_PTRACE_SETHBPREGS)
     227  #endif
     228  };
     229  static
     230  const struct xlat compat_ptrace_cmds[1] = { {
     231   .data = compat_ptrace_cmds_xdata,
     232   .size = ARRAY_SIZE(compat_ptrace_cmds_xdata),
     233   .type = XT_SORTED,
     234   .flags_mask = 0
     235  #  ifdef XLAT_VAL_0
     236    | XLAT_VAL_0
     237  #  endif
     238  #  ifdef XLAT_VAL_1
     239    | XLAT_VAL_1
     240  #  endif
     241  #  ifdef XLAT_VAL_2
     242    | XLAT_VAL_2
     243  #  endif
     244  #  ifdef XLAT_VAL_3
     245    | XLAT_VAL_3
     246  #  endif
     247  #  ifdef XLAT_VAL_4
     248    | XLAT_VAL_4
     249  #  endif
     250  #  ifdef XLAT_VAL_5
     251    | XLAT_VAL_5
     252  #  endif
     253  #  ifdef XLAT_VAL_6
     254    | XLAT_VAL_6
     255  #  endif
     256  #  ifdef XLAT_VAL_7
     257    | XLAT_VAL_7
     258  #  endif
     259  #  ifdef XLAT_VAL_8
     260    | XLAT_VAL_8
     261  #  endif
     262  #  ifdef XLAT_VAL_9
     263    | XLAT_VAL_9
     264  #  endif
     265    ,
     266   .flags_strsz = 0
     267  #  ifdef XLAT_STR_0
     268    + sizeof(XLAT_STR_0)
     269  #  endif
     270  #  ifdef XLAT_STR_1
     271    + sizeof(XLAT_STR_1)
     272  #  endif
     273  #  ifdef XLAT_STR_2
     274    + sizeof(XLAT_STR_2)
     275  #  endif
     276  #  ifdef XLAT_STR_3
     277    + sizeof(XLAT_STR_3)
     278  #  endif
     279  #  ifdef XLAT_STR_4
     280    + sizeof(XLAT_STR_4)
     281  #  endif
     282  #  ifdef XLAT_STR_5
     283    + sizeof(XLAT_STR_5)
     284  #  endif
     285  #  ifdef XLAT_STR_6
     286    + sizeof(XLAT_STR_6)
     287  #  endif
     288  #  ifdef XLAT_STR_7
     289    + sizeof(XLAT_STR_7)
     290  #  endif
     291  #  ifdef XLAT_STR_8
     292    + sizeof(XLAT_STR_8)
     293  #  endif
     294  #  ifdef XLAT_STR_9
     295    + sizeof(XLAT_STR_9)
     296  #  endif
     297    ,
     298  } };
     299  DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
     300  
     301  #  undef XLAT_STR_0
     302  #  undef XLAT_VAL_0
     303  #  undef XLAT_STR_1
     304  #  undef XLAT_VAL_1
     305  #  undef XLAT_STR_2
     306  #  undef XLAT_VAL_2
     307  #  undef XLAT_STR_3
     308  #  undef XLAT_VAL_3
     309  #  undef XLAT_STR_4
     310  #  undef XLAT_VAL_4
     311  #  undef XLAT_STR_5
     312  #  undef XLAT_VAL_5
     313  #  undef XLAT_STR_6
     314  #  undef XLAT_VAL_6
     315  #  undef XLAT_STR_7
     316  #  undef XLAT_VAL_7
     317  #  undef XLAT_STR_8
     318  #  undef XLAT_VAL_8
     319  #  undef XLAT_STR_9
     320  #  undef XLAT_VAL_9
     321  # endif /* !IN_MPERS */
     322  
     323  #endif /* !XLAT_MACROS_ONLY */