[Lldb-commits] [lldb] [lldb][AIX] Extract CPU type and set up process architecture accordingly (PR #189910)

Hemang Gadhavi via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 1 05:42:40 PDT 2026


================
@@ -81,6 +84,35 @@ static bool GetStatusInfo(::pid_t pid, ProcessInstanceInfo &processInfo,
   return true;
 }
 
+static ArchSpec GetXCOFFProcessCPUType(llvm::StringRef exe_path) {
+  Log *log = GetLog(LLDBLog::Host);
+
+  auto file_buffer = llvm::MemoryBuffer::getFile(exe_path);
+  if (!file_buffer)
+    return ArchSpec();
+
+  llvm::Expected<std::unique_ptr<llvm::object::ObjectFile>> obj_or_err =
+      llvm::object::ObjectFile::createObjectFile(
+          (*file_buffer)->getMemBufferRef());
+
+  if (!obj_or_err)
+    return ArchSpec();
----------------
HemangGadhavi wrote:

Done.

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


More information about the lldb-commits mailing list