summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Section.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-21 21:49:46 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-21 21:49:46 +0000
commit70e33eb06e8893c401fcb1f34b1404c02c7d9f05 (patch)
tree943eba38bf799f6a6ff473deec403c34881df122 /lldb/source/Core/Section.cpp
parent6238c1d102e5ef616d67f8c10ca182d56f5500f9 (diff)
downloadbcm5719-llvm-70e33eb06e8893c401fcb1f34b1404c02c7d9f05.tar.gz
bcm5719-llvm-70e33eb06e8893c401fcb1f34b1404c02c7d9f05.zip
Allow searching for a section by SectionType.
llvm-svn: 109040
Diffstat (limited to 'lldb/source/Core/Section.cpp')
-rw-r--r--lldb/source/Core/Section.cpp17
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
{
OpenPOWER on IntegriCloud