diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-09-28 18:33:50 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-09-28 18:33:50 +0000 |
commit | c0f53df8ff613aed5901edadb8dcfa7761ad164c (patch) | |
tree | 26cc891b524e8755ff71876f475266e32337aa66 /lldb/test/python_api/module_section/TestModuleAndSection.py | |
parent | 933d51682ff2b9c4b4e4f3c0b25b87985baf1514 (diff) | |
download | bcm5719-llvm-c0f53df8ff613aed5901edadb8dcfa7761ad164c.tar.gz bcm5719-llvm-c0f53df8ff613aed5901edadb8dcfa7761ad164c.zip |
Modify lldbutil.in_range(symbol, section) to deal with the symbol whose
end address is an LLDB_INVALID_ADDRESS. Modify the test case to dump
all the symbols in all the sections.
llvm-svn: 140710
Diffstat (limited to 'lldb/test/python_api/module_section/TestModuleAndSection.py')
-rw-r--r-- | lldb/test/python_api/module_section/TestModuleAndSection.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py index 66f46b8bc97..cecc5ab61f2 100644 --- a/lldb/test/python_api/module_section/TestModuleAndSection.py +++ b/lldb/test/python_api/module_section/TestModuleAndSection.py @@ -43,8 +43,12 @@ class ModuleAndSectionAPIsTestCase(TestBase): INDENT2 = INDENT * 2 for sec in exe_module.section_iter(): print sec - if sec.GetName() == "__TEXT": - print INDENT + "Number of subsections: %d" % sec.GetNumSubSections() + print INDENT + "Number of subsections: %d" % sec.GetNumSubSections() + if sec.GetNumSubSections() == 0: + for sym in symbol_iter(exe_module, sec): + print INDENT + repr(sym) + print INDENT + "symbol type: %s" % symbol_type_to_str(sym.GetType()) + else: for subsec in sec: print INDENT + repr(subsec) # Now print the symbols belonging to the subsection.... |