26 lines · python
1"""Test that stepping in object files with multiple compile units works."""2 3import lldb4from lldbsuite.test.decorators import *5from lldbsuite.test.lldbtest import *6import lldbsuite.test.lldbutil as lldbutil7 8 9class TestFullLtoStepping(TestBase):10 # The Makefile manually invokes clang.11 @skipIfAsan12 @skipIf(compiler=no_match("clang"))13 @skipIf(compiler="clang", compiler_version=["<", "13.0"])14 @skipUnlessDarwin15 def test(self):16 self.build()17 _, _, thread, _ = lldbutil.run_to_name_breakpoint(self, "main")18 19 name = thread.frames[0].GetFunctionName()20 # Check that we start out in main.21 self.assertEqual(name, "main")22 thread.StepInto()23 name = thread.frames[0].GetFunctionName()24 # Check that we stepped into f.25 self.assertEqual(name, "f")26