1 """Test that forward declarations don't cause bogus conflicts in namespaced types"""
5 from lldbsuite
.test
.lldbtest
import *
6 from lldbsuite
.test
.decorators
import *
7 import lldbsuite
.test
.lldbutil
as lldbutil
10 class NamespaceDefinitionsTestCase(TestBase
):
11 # See also llvm.org/pr28948
12 @expectedFailureAll(bugnumber
="llvm.org/pr50814", compiler
="gcc")
14 bugnumber
="llvm.org/pr28948",
17 archs
=["arm", "aarch64"],
19 @expectedFailureAll(oslist
=["windows"])
25 "expression -- Foo::MyClass()",
26 VARIABLES_DISPLAYED_CORRECTLY
,
31 # Call super's setUp().
33 # Find the line number to break inside main().
34 self
.source
= "main.cpp"
35 self
.line
= line_number(self
.source
, "// Set breakpoint here")
36 self
.shlib_names
= ["a", "b"]
38 def common_setup(self
):
39 # Run in synchronous mode
40 self
.dbg
.SetAsync(False)
42 # Create a target by the debugger.
43 target
= self
.dbg
.CreateTarget(self
.getBuildArtifact("a.out"))
44 self
.assertTrue(target
, VALID_TARGET
)
46 # Break inside the foo function which takes a bar_ptr argument.
47 lldbutil
.run_break_set_by_file_and_line(
48 self
, self
.source
, self
.line
, num_expected_locations
=1, loc_exact
=True
51 # Register our shared libraries for remote targets so they get
52 # automatically uploaded
53 environment
= self
.registerSharedLibrariesWithTarget(target
, self
.shlib_names
)
55 # Now launch the process, and do not stop at entry point.
56 process
= target
.LaunchSimple(
57 None, environment
, self
.get_process_working_directory()
59 self
.assertTrue(process
, PROCESS_IS_VALID
)
61 # The stop reason of the thread should be breakpoint.
64 STOPPED_DUE_TO_BREAKPOINT
,
65 substrs
=["stopped", "stop reason = breakpoint"],
68 # The breakpoint should have a hit count of 1.
69 lldbutil
.check_breakpoint(self
, bpno
=1, expected_hit_count
=1)