================
@@ -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");
----------------
emaste wrote:

It's had the current name for over 2 decades, 
https://github.com/freebsd/freebsd-src/commit/e409590d0e0e57c6ec37d95bcb9fa3728051ebb1

The sysctl existed prior to that with a different name; I didn't bother looking 
to see when that was introduced.

https://github.com/llvm/llvm-project/pull/79662
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to