Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / c / stepping / TestThreadStepInAvoidRegexp.py
blob3091413eedf2d249673be8038c20c8c6e796167f
1 """
2 Test thread step-in [ -r | --step-over-regexp ].
3 """
6 import lldb
7 from lldbsuite.test.lldbtest import *
8 import lldbsuite.test.lldbutil as lldbutil
9 from lldbsuite.test.decorators import *
12 class ThreadStepInAvoidRegexTestCase(TestBase):
13 def setUp(self):
14 TestBase.setUp(self)
15 self.line2 = line_number("main.c", "// assignment to B2")
17 @skipIfWindows
18 def test_step_out_avoid_regexp(self):
19 """Exercise thread step-in -r"""
20 self.build()
21 lldbutil.run_to_source_breakpoint(
22 self,
23 "frame select 2, thread step-out while stopped",
24 lldb.SBFileSpec("main.c"),
27 # Now step in, skipping the frames for 'b' and 'a'.
28 self.runCmd("thread step-in -r 'a'")
30 # We should be at the assignment to B2.
31 self.expect(
32 "thread backtrace",
33 STEP_IN_SUCCEEDED,
34 substrs=["stop reason = step in"],
35 patterns=["frame #0.*main.c:%d" % self.line2],