blob: 59dd76a2584c353410f9c5b10e471976be91cecf [file] [log] [blame]
Tamas Berghammer1e209fc2015-03-13 11:36:47 +00001//===-- Procfs.h ---------------------------------------------- -*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Tamas Berghammer1e209fc2015-03-13 11:36:47 +00006//
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__
Kate Stoneb9c1b512016-09-06 20:57:50 +000015#if defined(__arm64__) || defined(__aarch64__)
Tamas Berghammer1e209fc2015-03-13 11:36:47 +000016typedef unsigned long elf_greg_t;
Kate Stoneb9c1b512016-09-06 20:57:50 +000017typedef elf_greg_t
18 elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
Tamas Berghammer1e209fc2015-03-13 11:36:47 +000019typedef struct user_fpsimd_state elf_fpregset_t;
20#ifndef NT_FPREGSET
Kate Stoneb9c1b512016-09-06 20:57:50 +000021#define NT_FPREGSET NT_PRFPREG
Tamas Berghammer1e209fc2015-03-13 11:36:47 +000022#endif // NT_FPREGSET
Kate Stoneb9c1b512016-09-06 20:57:50 +000023#elif defined(__mips__)
Tamas Berghammer068f8a72015-05-26 11:58:52 +000024#ifndef NT_FPREGSET
Kate Stoneb9c1b512016-09-06 20:57:50 +000025#define NT_FPREGSET NT_PRFPREG
Tamas Berghammer068f8a72015-05-26 11:58:52 +000026#endif // NT_FPREGSET
27#endif
Kate Stoneb9c1b512016-09-06 20:57:50 +000028#else // __ANDROID__
Tamas Berghammer1e209fc2015-03-13 11:36:47 +000029#include <sys/procfs.h>
30#endif // __ANDROID__