2 Test that we can hit breakpoints in global constructors
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class TestBreakpointInGlobalConstructors(TestBase):
15 mydir = TestBase.compute_mydir(__file__)
16 NO_DEBUG_INFO_TESTCASE = True
18 @expectedFailureNetBSD
21 self.line_foo = line_number('foo.cpp', '// !BR_foo')
22 self.line_main = line_number('main.cpp', '// !BR_main')
24 target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
25 self.assertTrue(target, VALID_TARGET)
27 env= self.registerSharedLibrariesWithTarget(target, ["foo"])
29 bp_main = lldbutil.run_break_set_by_file_and_line(
30 self, 'main.cpp', self.line_main)
32 bp_foo = lldbutil.run_break_set_by_file_and_line(
33 self, 'foo.cpp', self.line_foo, num_expected_locations=-2)
35 process = target.LaunchSimple(
36 None, env, self.get_process_working_directory())
39 lldbutil.get_one_thread_stopped_at_breakpoint_id(
40 self.process(), bp_foo))
42 self.runCmd("continue")
45 lldbutil.get_one_thread_stopped_at_breakpoint_id(
46 self.process(), bp_main))