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 <[email protected]> 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: _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
