[Lldb-commits] [lldb] [lldb][AIX] Support for XCOFF Sections (PR #131304)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon May 12 01:58:14 PDT 2025
================
@@ -190,7 +190,59 @@ void ObjectFileXCOFF::ParseSymtab(Symtab &lldb_symtab) {}
bool ObjectFileXCOFF::IsStripped() { return false; }
-void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {}
+void ObjectFileXCOFF::CreateSections(SectionList &unified_section_list) {
+ if (m_sections_up)
+ return;
+
+ m_sections_up = std::make_unique<SectionList>();
+ ModuleSP module_sp(GetModule());
+
+ if (!module_sp)
+ return;
+
+ std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
+
+ const auto §ions = m_binary->sections64();
+ int idx = 0;
+ for (size_t i = 0; i < sections.size(); ++i) {
+ const llvm::object::XCOFFSectionHeader64 §ion = sections[i];
----------------
labath wrote:
Does this not work for some reason?
```suggestion
int idx = 0;
for (const llvm::object::XCOFFSectionHeader64 §ion = m_binary->sections64()) {
```
https://github.com/llvm/llvm-project/pull/131304
More information about the lldb-commits
mailing list