Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / macosx / duplicate-archive-members / TestDuplicateMembers.py
blob1746b2d3a47b19fce417e9e27740f5d7d0fb3d99
1 """Test breaking inside functions defined within a BSD archive file libfoo.a."""
4 import lldb
5 from lldbsuite.test.decorators import *
6 from lldbsuite.test.lldbtest import *
7 from lldbsuite.test import lldbutil
10 class BSDArchivesTestCase(TestBase):
11 @expectedFailureAll(
12 oslist=["windows"],
13 bugnumber="llvm.org/pr24527. Makefile.rules doesn't know how to build static libs on Windows",
15 def test(self):
16 """Break inside a() and b() defined within libfoo.a."""
17 self.build()
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.
29 self.expect(
30 "thread list",
31 STOPPED_DUE_TO_BREAKPOINT,
32 substrs=["stopped", "stop reason = breakpoint"],
35 # Break at a(int) first.
36 self.expect(
37 "frame variable", VARIABLES_DISPLAYED_CORRECTLY, substrs=["(int) arg = 1"]
39 self.expect(
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")
47 self.expect(
48 "thread list",
49 STOPPED_DUE_TO_BREAKPOINT,
50 substrs=["stopped", "stop reason = breakpoint"],
52 self.expect(
53 "frame variable", VARIABLES_DISPLAYED_CORRECTLY, substrs=["(int) arg = 2"]
55 self.expect(
56 "frame variable __b_global",
57 VARIABLES_DISPLAYED_CORRECTLY,
58 substrs=["(int) __b_global = 2"],