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

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 1 02:00:07 PDT 2026


================
@@ -368,8 +359,9 @@ void ObjectFileXCOFF::CreateSectionsWithBitness(
 void ObjectFileXCOFF::Dump(Stream *s) {}
 
 ArchSpec ObjectFileXCOFF::GetArchitecture() {
-  ArchSpec arch_spec =
-      ArchSpec(eArchTypeXCOFF, XCOFF::TCPU_PPC64, LLDB_INVALID_CPUTYPE);
+  const uint32_t cpu_type =
+      m_binary->is64Bit() ? XCOFF::TCPU_PPC64 : XCOFF::TCPU_PPC;
+  ArchSpec arch_spec = ArchSpec(eArchTypeXCOFF, cpu_type, LLDB_INVALID_CPUTYPE);
----------------
DavidSpickett wrote:

Combine with the line below to make it:
```
return ArchSpec(....
```

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


More information about the lldb-commits mailing list