llvm-project/lldb/test/API/lang/cpp/step-through-trampoline/TestStepThroughTrampoline.py
Michael Daniels d8ad018869 [lldb] fix stepping through POSIX trampolines
The DynamicLoaderPOSIXDYLD::GetStepThroughTrampolinePlan() function was
doing the symbol lookup using the demangled name. This stopped working
with https://reviews.llvm.org/D118814. To get things working again, just
use the mangled name for the lookup instead.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D127999
2022-06-29 11:06:29 +02:00

18 lines
649 B
Python

import lldb
from lldbsuite.test.lldbtest import *
import lldbsuite.test.lldbutil as lldbutil
class StepThroughTrampoline(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test(self):
self.build()
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
"// Set a breakpoint here",
lldb.SBFileSpec("main.cpp"),
extra_images=["foo"])
thread.StepInto()
foo_line = line_number("foo.cpp", '// End up here')
self.expect("frame info", substrs=["foo.cpp:{}:".format(foo_line)])