diff options
Diffstat (limited to 'lldb/source/Core')
-rw-r--r-- | lldb/source/Core/Address.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/Section.cpp | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index c3cb88ec065..97595326b34 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -508,7 +508,7 @@ Address::Dump (Stream *s, ExecutionContextScope *exe_scope, DumpStyle style, Dum const Section *section = GetSection(); if (section) { - SectionType sect_type = section->GetSectionType(); + SectionType sect_type = section->GetType(); switch (sect_type) { case eSectionTypeDataCString: diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index 89549f002ab..e4617a8ee99 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -566,6 +566,23 @@ SectionList::FindSectionByID (user_id_t sect_id) const return sect_sp; } + +SectionSP +SectionList::FindSectionByType (lldb::SectionType sect_type, uint32_t start_idx) const +{ + SectionSP sect_sp; + uint32_t num_sections = m_sections.size(); + for (uint32_t idx = start_idx; idx < num_sections; ++idx) + { + if (m_sections[idx]->GetType() == sect_type) + { + sect_sp = m_sections[idx]; + break; + } + } + return sect_sp; +} + SectionSP SectionList::GetSharedPointer (const Section *section, bool check_children) const { |