[Lldb-commits] [lldb] ee9d52a - [lldb] Remove obsolete Android-specific definitions

Pirama Arumuga Nainar via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 24 14:47:29 PDT 2022


Author: Pirama Arumuga Nainar
Date: 2022-08-24T21:47:13Z
New Revision: ee9d52a2819668c746aa66e7d628cce04bedbd17

URL: https://github.com/llvm/llvm-project/commit/ee9d52a2819668c746aa66e7d628cce04bedbd17
DIFF: https://github.com/llvm/llvm-project/commit/ee9d52a2819668c746aa66e7d628cce04bedbd17.diff

LOG: [lldb] Remove obsolete Android-specific definitions

Bionic's <sys/procfs.h> defines the necessary symbols.  Remove the
specialization for Android and the now-unnecessary include of
<sys/ptrace.h>.  This also helps resolve issues when building the
x86/x86_64 lldb-server for Android.

Curiously, the default branch to include <sys/procfs.h> doesn't seem
necessary on Linux.  I'll remove it and add it back if it breaks other
builders.

Differential Revision: https://reviews.llvm.org/D132514

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Linux/Procfs.h

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Linux/Procfs.h b/lldb/source/Plugins/Process/Linux/Procfs.h
index ed4b1b35f0f37..a62447354f9fd 100644
--- a/lldb/source/Plugins/Process/Linux/Procfs.h
+++ b/lldb/source/Plugins/Process/Linux/Procfs.h
@@ -6,32 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-// source/Plugins/Process/Linux/Procfs.h defines the symbols we need from
-// sys/procfs.h on Android/Linux for all supported architectures.
-
 #include "lldb/lldb-types.h"
 #include "llvm/Support/Error.h"
-#include <sys/ptrace.h>
 #include <vector>
 
-#ifdef __ANDROID__
-#if defined(__arm64__) || defined(__aarch64__)
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t
-    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
-typedef struct user_fpsimd_state elf_fpregset_t;
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#elif defined(__mips__)
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#endif
-#else // __ANDROID__
-#include <sys/procfs.h>
-#endif // __ANDROID__
-
 namespace lldb_private {
 namespace process_linux {
 


        


More information about the lldb-commits mailing list