1 """Test that DWARF types are trusted over module types"""
3 from __future__ import print_function
8 from distutils.version import StrictVersion
10 from lldbsuite.test.decorators import *
11 from lldbsuite.test.lldbtest import *
12 from lldbsuite.test import lldbutil
15 class IncompleteModulesTestCase(TestBase):
17 mydir = TestBase.compute_mydir(__file__)
20 # Call super's setUp().
22 # Find the line number to break inside main().
23 self.line = line_number('main.m', '// Set breakpoint 0 here.')
26 @unittest2.expectedFailure("rdar://20416388")
27 @skipIf(macos_version=["<", "10.12"])
30 exe = os.path.join(os.getcwd(), "a.out")
31 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
33 # Break inside the foo function which takes a bar_ptr argument.
34 lldbutil.run_break_set_by_file_and_line(
35 self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
37 self.runCmd("run", RUN_SUCCEEDED)
39 # The stop reason of the thread should be breakpoint.
40 self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
42 'stop reason = breakpoint'])
44 # The breakpoint should have a hit count of 1.
45 self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
46 substrs=[' resolved, hit count = 1'])
49 "settings set target.clang-module-search-paths \"" +
53 self.expect("expr @import myModule; 3", VARIABLES_DISPLAYED_CORRECTLY,
57 "expr [myObject privateMethod]",
58 VARIABLES_DISPLAYED_CORRECTLY,
63 self.expect("expr MIN(2,3)", "#defined macro was found",
66 self.expect("expr MAX(2,3)", "#undefd macro was correcltly not found",