diff options
Diffstat (limited to 'lldb/source/Core/Section.cpp')
-rw-r--r-- | lldb/source/Core/Section.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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 { |