1 """Test breaking inside functions defined within a BSD archive file libfoo.a."""
5 from lldbsuite
.test
.decorators
import *
6 from lldbsuite
.test
.lldbtest
import *
7 from lldbsuite
.test
import lldbutil
10 class BSDArchivesTestCase(TestBase
):
13 bugnumber
="llvm.org/pr24527. Makefile.rules doesn't know how to build static libs on Windows",
16 """Break inside a() and b() defined within libfoo.a."""
19 exe
= self
.getBuildArtifact("a.out")
20 self
.runCmd("file " + exe
, CURRENT_EXECUTABLE_SET
)
22 # Break on a() and b() symbols
23 lldbutil
.run_break_set_by_symbol(self
, "a", sym_exact
=True)
24 lldbutil
.run_break_set_by_symbol(self
, "b", sym_exact
=True)
26 self
.runCmd("run", RUN_SUCCEEDED
)
28 # The stop reason of the thread should be breakpoint.
31 STOPPED_DUE_TO_BREAKPOINT
,
32 substrs
=["stopped", "stop reason = breakpoint"],
35 # Break at a(int) first.
37 "frame variable", VARIABLES_DISPLAYED_CORRECTLY
, substrs
=["(int) arg = 1"]
40 "frame variable __a_global",
41 VARIABLES_DISPLAYED_CORRECTLY
,
42 substrs
=["(int) __a_global = 1"],
45 # Continue the program, we should break at b(int) next.
46 self
.runCmd("continue")
49 STOPPED_DUE_TO_BREAKPOINT
,
50 substrs
=["stopped", "stop reason = breakpoint"],
53 "frame variable", VARIABLES_DISPLAYED_CORRECTLY
, substrs
=["(int) arg = 2"]
56 "frame variable __b_global",
57 VARIABLES_DISPLAYED_CORRECTLY
,
58 substrs
=["(int) __b_global = 2"],