[Lldb-commits] [lldb] [lldb][AIX] get host info for AIX (PR #134354)

via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 10 04:51:32 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- lldb/source/Host/aix/Host.cpp
``````````

</details>

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

``````````diff
diff --git a/lldb/source/Host/aix/Host.cpp b/lldb/source/Host/aix/Host.cpp
index 6f2b2ac16..4defd6686 100644
--- a/lldb/source/Host/aix/Host.cpp
+++ b/lldb/source/Host/aix/Host.cpp
@@ -6,9 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <fcntl.h>
-#include <sstream>
-#include <sys/procfs.h>
 #include "lldb/Host/Host.h"
 #include "lldb/Host/linux/Support.h"
 #include "lldb/Utility/LLDBLog.h"
@@ -16,6 +13,9 @@
 #include "lldb/Utility/ProcessInfo.h"
 #include "lldb/Utility/Status.h"
 #include "llvm/BinaryFormat/XCOFF.h"
+#include <fcntl.h>
+#include <sstream>
+#include <sys/procfs.h>
 
 using namespace llvm;
 using namespace lldb;
@@ -101,12 +101,12 @@ static bool GetExePathAndArch(::pid_t pid, ProcessInstanceInfo &process_info) {
   auto BufferOrError = getProcFile(pid, "psinfo");
   if (!BufferOrError)
     return false;
-  
+
   std::unique_ptr<llvm::MemoryBuffer> PsinfoBuffer = std::move(*BufferOrError);
   // Ensure there's enough data for psinfoData
-  if(PsinfoBuffer->getBufferSize() < sizeof(psinfoData))  
+  if (PsinfoBuffer->getBufferSize() < sizeof(psinfoData))
     return false;
-  
+
   std::memcpy(&psinfoData, PsinfoBuffer->getBufferStart(), sizeof(psinfoData));
   llvm::StringRef PathRef(&(psinfoData.pr_psargs[0]));
   if (!PathRef.empty()) {
@@ -128,7 +128,7 @@ static bool GetProcessAndStatInfo(::pid_t pid,
   process_info.Clear();
   process_info.SetProcessID(pid);
 
-  if(!GetExePathAndArch(pid, process_info))
+  if (!GetExePathAndArch(pid, process_info))
     return false;
   // Get User and Group IDs and get tracer pid.
   if (!GetStatusInfo(pid, process_info, State, tracerpid, tgid))

``````````

</details>


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


More information about the lldb-commits mailing list