[Lldb-commits] [lldb] b5a84e2 - [debugserver] Un-conditionalize code guarded by macOS 10.10 checks

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 15 23:18:13 PDT 2021


Author: Jonas Devlieghere
Date: 2021-07-15T23:18:05-07:00
New Revision: b5a84e214d49c56d13dc1fb76273f575e6752c68

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

LOG: [debugserver] Un-conditionalize code guarded by macOS 10.10 checks

We've been requiring macOS 10.11 since 2018 so there's no point in
keeping code for 10.10 around.

Added: 
    

Modified: 
    lldb/tools/debugserver/source/MacOSX/MachProcess.mm
    lldb/tools/debugserver/source/RNBRemote.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index 7eab2c6d185f1..9ab33cc4b3aaa 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -2684,10 +2684,6 @@ static bool FBSAddEventDataToOptions(NSMutableDictionary *options,
 
 bool MachProcess::GetOSVersionNumbers(uint64_t *major, uint64_t *minor,
                                       uint64_t *patch) {
-#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) &&                  \
-    (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000)
-  return false;
-#else
   NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
   NSOperatingSystemVersion vers =
@@ -2702,7 +2698,6 @@ static bool FBSAddEventDataToOptions(NSMutableDictionary *options,
   [pool drain];
 
   return true;
-#endif
 }
 
 std::string MachProcess::GetMacCatalystVersionString() {

diff  --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp
index 7273d355acf9e..fdf97ca33e905 100644
--- a/lldb/tools/debugserver/source/RNBRemote.cpp
+++ b/lldb/tools/debugserver/source/RNBRemote.cpp
@@ -149,8 +149,6 @@ uint64_t decode_uint64(const char *p, int base, char **end = nullptr,
 extern void ASLLogCallback(void *baton, uint32_t flags, const char *format,
                            va_list args);
 
-#if defined(__APPLE__) &&                                                      \
-    (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
 // from System.framework/Versions/B/PrivateHeaders/sys/codesign.h
 extern "C" {
 #define CS_OPS_STATUS 0       /* return status */
@@ -165,7 +163,6 @@ typedef uint32_t csr_config_t;
 #define CSR_ALLOW_TASK_FOR_PID (1 << 2)
 int csr_check(csr_config_t mask);
 }
-#endif
 
 RNBRemote::RNBRemote()
     : m_ctx(), m_comm(), m_arch(), m_continue_thread(-1), m_thread(-1),


        


More information about the lldb-commits mailing list