Author: teemperor
Date: Thu Sep 26 04:30:41 2019
New Revision: 372965

URL: http://llvm.org/viewvc/llvm-project?rev=372965&view=rev
Log:
[lldb][modern-type-lookup] Add test for using the ClangModulesDeclVendor

Added:
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py
    
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile?rev=372965&view=auto
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile
 Thu Sep 26 04:30:41 2019
@@ -0,0 +1,4 @@
+OBJC_SOURCES := main.m
+LD_EXTRAS := -lobjc -framework Foundation
+
+include Makefile.rules

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py?rev=372965&view=auto
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py
 Thu Sep 26 04:30:41 2019
@@ -0,0 +1,26 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestObjcModulesModernTypeLookup(TestBase):
+  mydir = TestBase.compute_mydir(__file__)
+
+  @skipUnlessDarwin
+  # gmodules causes this to crash as we seem to get a NSURL type from the 
debug information.
+  @skipIf(debug_info="gmodules")
+  def test(self):
+    self.build()
+    # Activate modern-type-lookup.
+    # FIXME: This has to happen before we create any target otherwise we 
crash...
+    self.runCmd("settings set target.experimental.use-modern-type-lookup true")
+    (target, process, thread, main_breakpoint) = 
lldbutil.run_to_source_breakpoint(self,
+          "break here", lldb.SBFileSpec("main.m"))
+    self.expect("expr @import Foundation")
+    self.expect(
+            "p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]";,
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "NSURL",
+                "isa",
+                "_urlString"])

Added: 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m?rev=372965&view=auto
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m
 Thu Sep 26 04:30:41 2019
@@ -0,0 +1,6 @@
+#import <Foundation/Foundation.h>
+
+int main() {
+  NSLog(@"Hello World");
+  return 0; // break here
+}


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to