2 Test source text regex breakpoint hydrates module debug info
3 in symbol on-demand mode.
8 from lldbsuite
.test
.decorators
import *
9 from lldbsuite
.test
.lldbtest
import *
10 from lldbsuite
.test
import lldbutil
13 class TestSourceTextRegexBreakpoint(TestBase
):
15 def test_with_run_command(self
):
18 # Load symbols on-demand
19 self
.runCmd("settings set symbols.load-on-demand true")
21 self
.runCmd("file " + self
.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET
)
23 lldbutil
.run_break_set_by_source_regexp(self
, "Set break point at this line.")
24 self
.runCmd("run", RUN_SUCCEEDED
)
26 # The stop reason of the thread should be breakpoint.
29 STOPPED_DUE_TO_BREAKPOINT
,
30 substrs
=["stopped", "stop reason = breakpoint"],
34 self
.assertTrue(frame
.IsValid())
35 self
.assertEqual(frame
.GetLineEntry().GetFileSpec().GetFilename(), "main.cpp")
36 self
.assertEqual(frame
.GetLineEntry().GetLine(), 4)