================
@@ -2,28 +2,33 @@
Test lldb-dap stack trace response
"""
+from lldbsuite.test.decorators import add_test_categories
+from lldbsuite.test.lldbtest import line_number
+from lldbsuite.test.tools.lldb_dap import testcase
+from lldbsuite.test.tools.lldb_dap.types import LaunchArgs, StackTraceArgs
-import dap_server
-from lldbsuite.test.decorators import *
-import lldbdap_testcase
-from lldbsuite.test.lldbtest import *
-
-
-class TestDAP_subtleFrames(lldbdap_testcase.DAPTestCaseBase):
+class TestDAP_subtleFrames(testcase.DAPTestCaseBase):
@add_test_categories(["libc++"])
def test_subtleFrames(self):
"""
Internal stack frames (such as the ones used by `std::function`) are
marked as "subtle".
"""
program = self.getBuildArtifact("a.out")
- self.build_and_launch(program)
+ session = self.build_and_create_session()
source = "main.cpp"
- self.set_source_breakpoints(source, [line_number(source, "BREAK
HERE")])
- self.continue_to_next_stop()
+ with session.configure(LaunchArgs(program)) as ctx:
+ bp_line = line_number(source, "BREAK HERE")
+ bps = session.resolve_source_breakpoints(source, [bp_line])
- frames = self.get_stackFrames()
+ stop_event = session.verify_stopped_on_breakpoint(bps,
after=ctx.process_event)
+
+ thread_id = self.expect_not_none(stop_event.body.threadId)
+ resp = session.send_request(StackTraceArgs(thread_id)).result()
----------------
DrSergei wrote:
Why not `session.stack_trace(thread_id)`?
https://github.com/llvm/llvm-project/pull/211627
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits