================
@@ -0,0 +1,48 @@
+#include "pseudo_barrier.h"
+#include <chrono>
+#include <fcntl.h>
+#include <fstream>
+#include <stdio.h>
+#include <thread>
+#include <vector>
+
+pseudo_barrier_t barrier;
+
+constexpr size_t nthreads = 5;
+volatile bool wait_for_debugger_flag = true;
+
+void break_here() {}
+
+void tfunc() {
+  pseudo_barrier_wait(barrier);
+
+  break_here();
+}
+
+int main(int argc, char const *argv[]) {
+  lldb_enable_attach();
----------------
labath wrote:

Yes, but it's not really a "special" OS. Most linux systems are configured like 
that by default, where you're only allowed to debug your own children (unless 
they explicitly allow that, or you're root, etc.). Check out 
https://www.kernel.org/doc/html/v4.15/admin-guide/LSM/Yama.html. 
lldb_enable_attach is our own invention, which calls the appropriate os 
interface to enable attaching if necessary. Currently, it's only implemented on 
linux.

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

Reply via email to