2 Tests that functions with the same name are resolved correctly.
6 from lldbsuite.test.decorators import *
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test import lldbutil
11 class OverloadedFunctionsTestCase(TestBase):
13 mydir = TestBase.compute_mydir(__file__)
17 self.line = line_number('main.cpp', '// breakpoint')
19 def test_with_run_command(self):
20 """Test that functions with the same name are resolved correctly"""
22 self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
24 lldbutil.run_break_set_by_file_and_line(
25 self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
27 self.runCmd("process launch", RUN_SUCCEEDED)
29 # The stop reason of the thread should be breakpoint.
30 self.expect("thread list",
31 STOPPED_DUE_TO_BREAKPOINT,
32 substrs=['stopped', 'stop reason = breakpoint'])
34 self.expect("expression -- Dump(myB)",
35 startstr="(int) $0 = 2")
37 self.expect("expression -- Static()",
38 startstr="(int) $1 = 1")