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 10 11 12class ThreadStepInAvoidRegexTestCase(TestBase): 13 14 mydir = TestBase.compute_mydir(__file__) 15 16 def setUp(self): 17 TestBase.setUp(self) 18 self.line2 = line_number('main.c', '// assignment to B2') 19 20 @skipIfWindows 21 def test_step_out_avoid_regexp(self): 22 """Exercise thread step-in -r""" 23 self.build() 24 lldbutil.run_to_source_breakpoint(self, 25 'frame select 2, thread step-out while stopped', 26 lldb.SBFileSpec('main.c')) 27 28 # Now step in, skipping the frames for 'b' and 'a'. 29 self.runCmd("thread step-in -r 'a'") 30 31 # We should be at the assignment to B2. 32 self.expect("thread backtrace", STEP_IN_SUCCEEDED, 33 substrs=["stop reason = step in"], 34 patterns=["frame #0.*main.c:%d" % self.line2]) 35