1 //===-- Procfs.h ---------------------------------------------- -*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // source/Plugins/Process/Linux/Procfs.h defines the symbols we need from 10 // sys/procfs.h on Android/Linux for all supported architectures. 11 12 #include <sys/ptrace.h> 13 14 #ifdef __ANDROID__ 15 #if defined(__arm64__) || defined(__aarch64__) 16 typedef unsigned long elf_greg_t; 17 typedef elf_greg_t 18 elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 19 typedef struct user_fpsimd_state elf_fpregset_t; 20 #ifndef NT_FPREGSET 21 #define NT_FPREGSET NT_PRFPREG 22 #endif // NT_FPREGSET 23 #elif defined(__mips__) 24 #ifndef NT_FPREGSET 25 #define NT_FPREGSET NT_PRFPREG 26 #endif // NT_FPREGSET 27 #endif 28 #else // __ANDROID__ 29 #include <sys/procfs.h> 30 #endif // __ANDROID__ 31