[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 19 14:48:08 PDT 2025


================
@@ -1477,32 +1506,32 @@ size_t ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl &section_headers,
   }
   if (idx < section_headers.size())
     section_headers.resize(idx);
+  // Sometimes we are able to read the section header memory from an in memory
----------------
clayborg wrote:

Normal ELF files, when mapped into a process, will have sometimes or maybe always, have the data for the section headers in readable memory, but they are all set to zero. So it doesn't make sense to show a ton of `SHT_NULL` sections. So we keep one `SHT_NULL` section for the first section and remove the rest. I can check to make sure they are all SHT_NULL sections and only remove them if they are all SHT_NULL if that would make everyone feel better

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


More information about the lldb-commits mailing list