[Lldb-commits] [lldb] r153915 - /lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py

Johnny Chen johnny.chen at apple.com
Mon Apr 2 17:41:25 PDT 2012


Author: johnny
Date: Mon Apr  2 19:41:25 2012
New Revision: 153915

URL: http://llvm.org/viewvc/llvm-project?rev=153915&view=rev
Log:
Add some more debug prints and retrieve the debug subsections from the DWARF section.

Modified:
    lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py

Modified: lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py?rev=153915&r1=153914&r2=153915&view=diff
==============================================================================
--- lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py (original)
+++ lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py Mon Apr  2 19:41:25 2012
@@ -43,14 +43,22 @@
         # Get the executable module at index 0.
         exe_module = target.GetModuleAtIndex(0)
 
-        debug_str_section = exe_module.FindSection("__debug_str")
-        self.assertTrue(debug_str_section)
-        print "__debug_str section:", debug_str_section
+        dwarf_section = exe_module.FindSection("__DWARF")
+        self.assertTrue(dwarf_section)
+        print "__DWARF section:", dwarf_section
+        print "Number of sub-sections: %d" % dwarf_section.GetNumSubSections()
+        INDENT = ' ' * 4
+        for subsec in dwarf_section:
+            print INDENT + str(subsec)
+
+        debug_str_sub_section = dwarf_section.FindSubSection("__debug_str")
+        self.assertTrue(debug_str_sub_section)
+        print "__debug_str sub-section:", debug_str_sub_section
 
         # Find our __apple_types section by name.
-        apple_types_section = exe_module.FindSection("__apple_types")
-        self.assertTrue(apple_types_section)
-        print "__apple_types section:", apple_types_section
+        apple_types_sub_section = dwarf_section.FindSubSection("__apple_types")
+        self.assertTrue(apple_types_sub_section)
+        print "__apple_types sub-section:", apple_types_sub_section
 
 
 if __name__ == '__main__':





More information about the lldb-commits mailing list