Files
clang-p2996/lldb/test/API/lang/cpp/thunk/TestThunk.py
Jonas Devlieghere 2b41277a09 [lldb] Disable test_step_out_thunk on Windows
On Windows we end up in assembly. Not sure if the thread plans behave
differently or this is a debug info issue. I have no environment to
reproduce and investigate this in, so I'm disabling the test for now.
2025-02-17 16:25:13 -08:00

48 lines
1.3 KiB
Python

import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ThunkTest(TestBase):
def test_step_through_thunk(self):
self.build()
lldbutil.run_to_name_breakpoint(self, "testit")
# Make sure we step through the thunk into Derived1::doit
self.expect(
"step",
STEP_IN_SUCCEEDED,
substrs=["stop reason = step in", "Derived1::doit"],
)
self.runCmd("continue")
self.expect(
"step",
STEP_IN_SUCCEEDED,
substrs=["stop reason = step in", "Derived2::doit"],
)
@skipIfWindows
def test_step_out_thunk(self):
self.build()
lldbutil.run_to_name_breakpoint(self, "testit_debug")
# Make sure we step out of the thunk and end up in testit_debug.
source = "main.cpp"
line = line_number(source, "// Step here")
self.expect(
"step",
STEP_IN_SUCCEEDED,
substrs=["stop reason = step in", "{}:{}".format(source, line)],
)
self.runCmd("continue")
self.expect(
"step",
STEP_IN_SUCCEEDED,
substrs=["stop reason = step in", "Derived2::doit_debug"],
)