[ELF] Replace inExpr with lexState. NFC
[llvm-project.git] / lldb / test / API / macosx / duplicate-archive-members / TestDuplicateMembers.py
blob1a0e60e53b1a5baae4f0eba7a7166607d404e42e
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 def test(self):
12 """Break inside a() and b() defined within libfoo.a."""
13 self.build()
15 exe = self.getBuildArtifact("a.out")
16 self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
18 # Break on a() and b() symbols
19 lldbutil.run_break_set_by_symbol(self, "a", sym_exact=True)
20 lldbutil.run_break_set_by_symbol(self, "b", sym_exact=True)
22 self.runCmd("run", RUN_SUCCEEDED)
24 # The stop reason of the thread should be breakpoint.
25 self.expect(
26 "thread list",
27 STOPPED_DUE_TO_BREAKPOINT,
28 substrs=["stopped", "stop reason = breakpoint"],
31 # Break at a(int) first.
32 self.expect(
33 "frame variable", VARIABLES_DISPLAYED_CORRECTLY, substrs=["(int) arg = 1"]
35 self.expect(
36 "frame variable __a_global",
37 VARIABLES_DISPLAYED_CORRECTLY,
38 substrs=["(int) __a_global = 1"],
41 # Continue the program, we should break at b(int) next.
42 self.runCmd("continue")
43 self.expect(
44 "thread list",
45 STOPPED_DUE_TO_BREAKPOINT,
46 substrs=["stopped", "stop reason = breakpoint"],
48 self.expect(
49 "frame variable", VARIABLES_DISPLAYED_CORRECTLY, substrs=["(int) arg = 2"]
51 self.expect(
52 "frame variable __b_global",
53 VARIABLES_DISPLAYED_CORRECTLY,
54 substrs=["(int) __b_global = 2"],