• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2Test thread step-in [ -r | --step-over-regexp ].
3"""
4
5
6
7import lldb
8from lldbsuite.test.lldbtest import *
9import lldbsuite.test.lldbutil as lldbutil
10from lldbsuite.test.decorators import *
11
12
13class ThreadStepInAvoidRegexTestCase(TestBase):
14
15    mydir = TestBase.compute_mydir(__file__)
16
17    def setUp(self):
18        TestBase.setUp(self)
19        self.line2 = line_number('main.c', '// assignment to B2')
20
21    @skipIfWindows
22    def test_step_out_avoid_regexp(self):
23        """Exercise thread step-in -r"""
24        self.build()
25        lldbutil.run_to_source_breakpoint(self,
26                'frame select 2, thread step-out while stopped',
27                lldb.SBFileSpec('main.c'))
28
29        # Now step in, skipping the frames for 'b' and 'a'.
30        self.runCmd("thread step-in -r 'a'")
31
32        # We should be at the assignment to B2.
33        self.expect("thread backtrace", STEP_IN_SUCCEEDED,
34                    substrs=["stop reason = step in"],
35                    patterns=["frame #0.*main.c:%d" % self.line2])
36