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