When stopped in a hidden frame (either because we selected the hidden frame or hit a breakpoint inside it), a user most likely is intersted in exploring the immediate frames around it. But currently issuing `up`/`down` commands will unconditionally skip over all hidden frames. This patch makes it so `up`/`down` commands don't skip hidden frames if the frame we started it was a hidden frame.
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class NavigateHiddenFrameTestCase(TestBase):
|
|
NO_DEBUG_INFO_TESTCASE = True
|
|
|
|
@add_test_categories(["libc++"])
|
|
def test(self):
|
|
"""Test going up/down a backtrace but we started in a hidden frame."""
|
|
self.build()
|
|
(target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
|
|
self, "Break here", lldb.SBFileSpec("main.cpp")
|
|
)
|
|
# up
|
|
self.assertIn("__impl2", thread.selected_frame.GetFunctionName())
|
|
self.expect("up")
|
|
self.assertIn("__impl1", thread.selected_frame.GetFunctionName())
|
|
self.expect("up")
|
|
self.assertIn("__impl", thread.selected_frame.GetFunctionName())
|
|
self.expect("up")
|
|
self.assertIn("non_impl", thread.selected_frame.GetFunctionName())
|
|
|
|
# Back down again.
|
|
self.expect("down")
|
|
self.assertIn("__impl", thread.selected_frame.GetFunctionName())
|
|
self.expect("down")
|
|
self.assertIn("__impl1", thread.selected_frame.GetFunctionName())
|
|
self.expect("down")
|
|
self.assertIn("__impl2", thread.selected_frame.GetFunctionName())
|