33 lines · python
1import lldb2from lldbsuite.test.decorators import *3from lldbsuite.test.lldbtest import *4from lldbsuite.test import lldbutil5 6 7class NavigateHiddenFrameTestCase(TestBase):8 NO_DEBUG_INFO_TESTCASE = True9 10 @add_test_categories(["libc++"])11 def test(self):12 """Test going up/down a backtrace but we started in a hidden frame."""13 self.build()14 (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(15 self, "Break here", lldb.SBFileSpec("main.cpp")16 )17 # up18 self.assertIn("__impl2", thread.selected_frame.GetFunctionName())19 self.expect("up")20 self.assertIn("__impl1", thread.selected_frame.GetFunctionName())21 self.expect("up")22 self.assertIn("__impl", thread.selected_frame.GetFunctionName())23 self.expect("up")24 self.assertIn("non_impl", thread.selected_frame.GetFunctionName())25 26 # Back down again.27 self.expect("down")28 self.assertIn("__impl", thread.selected_frame.GetFunctionName())29 self.expect("down")30 self.assertIn("__impl1", thread.selected_frame.GetFunctionName())31 self.expect("down")32 self.assertIn("__impl2", thread.selected_frame.GetFunctionName())33