[Lldb-commits] [lldb] [lldb] checks beforehand if lldb can trace/attach a process on FreeBSD. (PR #79662)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 26 20:50:18 PST 2024
================
@@ -48,14 +48,37 @@ static Status EnsureFDFlags(int fd, int flags) {
return error;
}
+static Status CanTrace() {
+ Status status;
+ int proc_debug, ret;
+ size_t len = sizeof(proc_debug);
+ ret = ::sysctlbyname("security.bsd.unprivileged_proc_debug", &proc_debug,
+ &len, nullptr, 0);
+ if (ret != 0)
+ return Status("sysctlbyname() security.bsd.unprivileged_proc_debug failed");
----------------
bulbazord wrote:
Thanks for the explanation. Consider my concerns addressed, don't let my "Requested Changes" block this from going in after another approval. :)
https://github.com/llvm/llvm-project/pull/79662
More information about the lldb-commits
mailing list