1 """Test that DWARF types are trusted over module types"""
4 from lldbsuite
.test
.decorators
import *
5 from lldbsuite
.test
.lldbtest
import *
6 from lldbsuite
.test
import lldbutil
9 class IncompleteModulesTestCase(TestBase
):
11 # Call super's setUp().
13 # Find the line number to break inside main().
14 self
.line
= line_number("main.m", "// Set breakpoint 0 here.")
16 @add_test_categories(["gmodules"])
19 exe
= self
.getBuildArtifact("a.out")
20 self
.runCmd("file " + exe
, CURRENT_EXECUTABLE_SET
)
21 lldbutil
.run_break_set_by_file_and_line(
22 self
, "main.m", self
.line
, num_expected_locations
=1, loc_exact
=True
25 self
.runCmd("run", RUN_SUCCEEDED
)
27 # The stop reason of the thread should be breakpoint.
30 STOPPED_DUE_TO_BREAKPOINT
,
31 substrs
=["stopped", "stop reason = breakpoint"],
34 # The breakpoint should have a hit count of 1.
35 lldbutil
.check_breakpoint(self
, bpno
=1, expected_hit_count
=1)
38 'settings set target.clang-module-search-paths "'
44 "expr @import myModule; 3",
45 VARIABLES_DISPLAYED_CORRECTLY
,
50 "expr private_func()", VARIABLES_DISPLAYED_CORRECTLY
, substrs
=["int", "5"]
54 "expr MY_MIN(2,3)", "#defined macro was found", substrs
=["int", "2"]
58 "expr MY_MAX(2,3)", "#undefd macro was correctly not found", error
=True