[Lldb-commits] [lldb] [lldb] checks beforehand if lldb can trace/attach a process on FreeBSD. (PR #79662)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 26 14:52:15 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff e4afffbe8cc31278a9006712e7323d49eae9dbb6 492521e66288a497bf5b4a4a8ce554dffeb35727 -- lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
index 7540ba2965..a2062bd3a9 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
@@ -52,13 +52,15 @@ 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);
+  ret = ::sysctlbyname("security.bsd.unprivileged_proc_debug", &proc_debug,
+                       &len, nullptr, 0);
   if (ret != 0) {
     return Status("sysctlbyname() security.bsd.unprivileged_proc_debug failed");
   }
 
   if (proc_debug < 1) {
-    return Status("process debug disabled by security.bsd.unprivileged_proc_debug oid");
+    return Status(
+        "process debug disabled by security.bsd.unprivileged_proc_debug oid");
   }
 
   return status;

``````````

</details>


https://github.com/llvm/llvm-project/pull/79662


More information about the lldb-commits mailing list