================
@@ -2,88 +2,94 @@
Test lldb-dap module request
"""
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-import lldbdap_testcase
+import platform
import re
+from lldbsuite.test.decorators import skipIfWindows, skipUnlessDarwin
+from lldbsuite.test.lldbtest import line_number
+from lldbsuite.test.tools.lldb_dap.dap_types import (
+ CompileUnitsArgs,
+ LaunchArgs,
+ ModuleEvent,
+ ModuleReason,
+)
+from lldbsuite.test.tools.lldb_dap.lldb_dap_testcase import DAPTestCaseBase
-@skipIfTargetDoesNotSupportSharedLibraries()
-class TestDAP_module(lldbdap_testcase.DAPTestCaseBase):
- def run_test(self, symbol_basename, expect_debug_info_size):
+
+class TestDAP_module(DAPTestCaseBase):
+ def run_test(self, symbol_basename: str, expect_debug_info_size: bool):
+ session = self.build_and_create_session()
program_basename = "a.out.stripped"
program = self.getBuildArtifact(program_basename)
- self.build_and_launch(program)
- functions = ["foo"]
- # This breakpoint will be resolved only when the libfoo module is
loaded
- breakpoint_ids = self.set_function_breakpoints(
- functions, wait_for_resolve=False
- )
- self.assertEqual(len(breakpoint_ids), len(functions), "expect one
breakpoint")
- self.continue_to_breakpoints(breakpoint_ids)
- active_modules = self.dap_server.get_modules()
+ with session.configure(LaunchArgs(program)) as ctx:
+ # This breakpoint will be resolved only when the libfoo module is
loaded.
+ breakpoints =
session.set_function_breakpoints(["foo"]).body.breakpoints
+ self.assertEqual(len(breakpoints), 1, "expect one breakpoint.")
+ foo_bp_id = self.expect_not_none(breakpoints[0].id)
----------------
DrSergei wrote:
Can we add check that `breakpoints[0].verified` is `False`?
https://github.com/llvm/llvm-project/pull/207869
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits