diff options
Diffstat (limited to 'lldb/source/Core/Section.cpp')
| -rw-r--r-- | lldb/source/Core/Section.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index 1660e3c92f2c..50c1562f7561 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -164,12 +164,6 @@ Section::Section(const ModuleSP &module_sp, ObjectFile *obj_file, m_log2align(log2align), m_children(), m_fake(false), m_encrypted(false), m_thread_specific(false), m_readable(false), m_writable(false), m_executable(false), m_relocated(false), m_target_byte_size(target_byte_size) { - // printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", - // addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - // - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s\n", - // this, module_sp.get(), sect_id, file_addr, file_addr + - // byte_size, file_offset, file_offset + file_size, flags, - // name.GetCString()); } Section::Section(const lldb::SectionSP &parent_section_sp, @@ -186,19 +180,11 @@ Section::Section(const lldb::SectionSP &parent_section_sp, m_log2align(log2align), m_children(), m_fake(false), m_encrypted(false), m_thread_specific(false), m_readable(false), m_writable(false), m_executable(false), m_relocated(false), m_target_byte_size(target_byte_size) { - // printf ("Section::Section(%p): module=%p, sect_id = 0x%16.16" PRIx64 ", - // addr=[0x%16.16" PRIx64 " - 0x%16.16" PRIx64 "), file [0x%16.16" PRIx64 " - // - 0x%16.16" PRIx64 "), flags = 0x%8.8x, name = %s.%s\n", - // this, module_sp.get(), sect_id, file_addr, file_addr + - // byte_size, file_offset, file_offset + file_size, flags, - // parent_section_sp->GetName().GetCString(), name.GetCString()); if (parent_section_sp) m_parent_wp = parent_section_sp; } -Section::~Section() { - // printf ("Section::~Section(%p)\n", this); -} +Section::~Section() = default; addr_t Section::GetFileAddress() const { SectionSP parent_sp(GetParent()); @@ -423,9 +409,15 @@ bool Section::ContainsOnlyDebugInfo() const { case eSectionTypeGoSymtab: case eSectionTypeAbsoluteAddress: case eSectionTypeOther: + // Used for "__dof_cache" in mach-o or ".debug" for COFF which isn't debug + // information that we parse at all. This was causing system files with no + // debug info to show debug info byte sizes in the "statistics dump" output + // for each module. New "eSectionType" enums should be created for dedicated + // debug info that has a predefined format if we wish for these sections to + // show up as debug info. + case eSectionTypeDebug: return false; - case eSectionTypeDebug: case eSectionTypeDWARFDebugAbbrev: case eSectionTypeDWARFDebugAbbrevDwo: case eSectionTypeDWARFDebugAddr: |
