[Lldb-commits] [lldb] [LLDB] Fix debuginfo ELF files overwriting Unified Section List (PR #166635)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 5 13:35:34 PST 2025


================
@@ -683,6 +683,34 @@ uint64_t SectionList::GetDebugInfoSize() const {
   return debug_info_size;
 }
 
+std::shared_ptr<SectionList>
+SectionList::Merge(SectionList &lhs, SectionList &rhs, MergeCallback filter) {
+  std::shared_ptr<SectionList> output_sp = std::make_shared<SectionList>();
+
+  // Iterate through all the sections in lhs and see if we have matches in
+  // the rhs list.
+  for (const auto &lhs_section : lhs) {
+    auto rhs_section = rhs.FindSectionByName(lhs_section->GetName());
+    if (rhs_section) {
----------------
clayborg wrote:

If you remove the assert below as suggested, remove the `{}` for single line if/else per llvm coding guidelines

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


More information about the lldb-commits mailing list