[Lldb-commits] [lldb] d53c9fe - [lldb/test] Fix MTC dylib path for newer Darwin embedded devices (NFC)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Sat Mar 14 01:14:22 PDT 2026
Author: Med Ismail Bennani
Date: 2026-03-14T01:13:36-07:00
New Revision: d53c9fe84eb58f82e5bfa30247b4447f85af541a
URL: https://github.com/llvm/llvm-project/commit/d53c9fe84eb58f82e5bfa30247b4447f85af541a
DIFF: https://github.com/llvm/llvm-project/commit/d53c9fe84eb58f82e5bfa30247b4447f85af541a.diff
LOG: [lldb/test] Fix MTC dylib path for newer Darwin embedded devices (NFC)
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Added:
Modified:
lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
index 9061327df8ad2..0d609dde6fd2a 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -166,11 +166,27 @@ def platformIsDarwin():
return getPlatform() in getDarwinOSTriples()
+def getDarwinEmbeddedKernelVersion():
+ """Returns the major kernel version of the remote device via 'uname -r'."""
+ shell_cmd = lldb.SBPlatformShellCommand("uname -r")
+ err = lldb.selected_platform.Run(shell_cmd)
+ if err.Success():
+ output = shell_cmd.GetOutput()
+ if output:
+ try:
+ return int(output.strip().split(".")[0])
+ except ValueError:
+ pass
+ return 0
+
+
def findMainThreadCheckerDylib():
if not platformIsDarwin():
return ""
if getPlatform() in lldbplatform.translate(lldbplatform.darwin_embedded):
+ if getDarwinEmbeddedKernelVersion() >= 26:
+ return "/usr/lib/libMainThreadChecker.dylib"
return "/Developer/usr/lib/libMainThreadChecker.dylib"
with os.popen("xcode-select -p") as output:
More information about the lldb-commits
mailing list