summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/target/TestTargetAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/python_api/target/TestTargetAPI.py')
-rw-r--r--lldb/test/python_api/target/TestTargetAPI.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py
index d57305c8b6a..70551ee31c9 100644
--- a/lldb/test/python_api/target/TestTargetAPI.py
+++ b/lldb/test/python_api/target/TestTargetAPI.py
@@ -252,9 +252,17 @@ class TargetAPITestCase(TestBase):
mod = target.GetModuleAtIndex(0)
data_section = None
for s in mod.sections:
- if ".data" == s.name:
+ sect_type = s.GetSectionType()
+ if sect_type == lldb.eSectionTypeData:
data_section = s
break
+ elif sect_type == lldb.eSectionTypeContainer:
+ for i in range(s.GetNumSubSections()):
+ ss = s.GetSubSectionAtIndex(i)
+ sect_type = ss.GetSectionType()
+ if sect_type == lldb.eSectionTypeData:
+ data_section = ss
+ break
self.assertIsNotNone(data_section)
return data_section
OpenPOWER on IntegriCloud