[Lldb-commits] [lldb] r153919 - /lldb/trunk/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py
Johnny Chen
johnny.chen at apple.com
Mon Apr 2 18:07:24 PDT 2012
Author: johnny
Date: Mon Apr 2 20:07:24 2012
New Revision: 153919
URL: http://llvm.org/viewvc/llvm-project?rev=153919&view=rev
Log:
Add a Test case to make sure that __apple_types section does get produced by dsymutil.
This is supposed to succeed even with rdar://problem/11166975.
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=153919&r1=153918&r2=153919&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 20:07:24 2012
@@ -22,11 +22,25 @@
self.skipTest("clang compiler only test")
self.buildDefault()
- self.apple_types()
+ self.apple_types(dot_o=True)
- def apple_types(self):
+ @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+ def test_debug_info_for_apple_types_dsym(self):
+ """Test that __apple_types section does get produced by dsymutil.
+ This is supposed to succeed even with rdar://problem/11166975."""
+
+ if not self.getCompiler().endswith('clang'):
+ self.skipTest("clang compiler only test")
+
+ self.buildDsym()
+ self.apple_types(dot_o=False)
+
+ def apple_types(self, dot_o):
"""Test that __apple_types section does get produced by clang."""
- exe = os.path.join(os.getcwd(), "main.o")
+ if dot_o:
+ exe = os.path.join(os.getcwd(), "main.o")
+ else:
+ exe = os.path.join(os.getcwd(), "a.out.dSYM/Contents/Resources/DWARF/a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
@@ -60,6 +74,11 @@
self.assertTrue(apple_types_sub_section)
print "__apple_types sub-section:", apple_types_sub_section
+ # These other three all important subsections should also be present.
+ self.assertTrue(dwarf_section.FindSubSection("__apple_names") and
+ dwarf_section.FindSubSection("__apple_namespac") and
+ dwarf_section.FindSubSection("__apple_objc"))
+
if __name__ == '__main__':
import atexit
More information about the lldb-commits
mailing list