From ced01f367183520e4b1a21dadfc1c3be044f5be3 Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Tue, 14 Oct 2025 13:01:24 -0700 Subject: [lldb][Darwin] Add `process launch --memory-tagging` option (#162944) For debugging and bug-finding workflows on Darwin, support launching processes with memory tagging for binaries that are not entitled. This will cause the process to behave as if the binary was entitled with: ``` com.apple.security.hardened-process.checked-allocations ``` This has no effect on hardware without MTE support. --------- Co-authored-by: Jonas Devlieghere --- lldb/source/Commands/CommandOptionsProcessLaunch.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Commands/CommandOptionsProcessLaunch.cpp') diff --git a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp index 21d94d68ceb9..8ae20bd76f45 100644 --- a/lldb/source/Commands/CommandOptionsProcessLaunch.cpp +++ b/lldb/source/Commands/CommandOptionsProcessLaunch.cpp @@ -127,6 +127,10 @@ Status CommandOptionsProcessLaunch::SetOptionValue( break; } + case 'M': + launch_info.GetFlags().Set(eLaunchFlagMemoryTagging); + break; + case 'c': if (!option_arg.empty()) launch_info.SetShell(FileSpec(option_arg)); -- cgit v1.2.3