[Lldb-commits] [lldb] [lldb][Darwin] Change DynamicLoaderDarwin to default to new SPI (PR #126171)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 6 18:58:30 PST 2025


================
@@ -1208,35 +1208,44 @@ DynamicLoaderDarwin::GetThreadLocalData(const lldb::ModuleSP module_sp,
 
 bool DynamicLoaderDarwin::UseDYLDSPI(Process *process) {
   Log *log = GetLog(LLDBLog::DynamicLoader);
-  bool use_new_spi_interface = false;
+  bool use_new_spi_interface = true;
 
   llvm::VersionTuple version = process->GetHostOSVersion();
   if (!version.empty()) {
     const llvm::Triple::OSType os_type =
         process->GetTarget().GetArchitecture().GetTriple().getOS();
 
-    // macOS 10.12 and newer
-    if (os_type == llvm::Triple::MacOSX &&
-        version >= llvm::VersionTuple(10, 12))
-      use_new_spi_interface = true;
+    // Older than macOS 10.12
+    if (os_type == llvm::Triple::MacOSX && version < llvm::VersionTuple(10, 12))
----------------
JDevlieghere wrote:

This seems ripe for a helper or lambda that takes a triple and an unsigned version :-) 

https://github.com/llvm/llvm-project/pull/126171


More information about the lldb-commits mailing list