[Lldb-commits] [lldb] [lldb-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Sun May 18 16:51:40 PDT 2025
================
@@ -78,8 +84,40 @@ def set_function_breakpoints(self, functions, condition=None, hitCondition=None)
breakpoint_ids = []
for breakpoint in breakpoints:
breakpoint_ids.append("%i" % (breakpoint["id"]))
+ if wait_for_resolve:
+ self.wait_for_breakpoints_to_resolve(breakpoint_ids, timeout=10)
return breakpoint_ids
+ def wait_for_breakpoints_to_resolve(
+ self, breakpoint_ids: list[str], timeout: Optional[float] = None
+ ):
+ unresolved_breakpoints = set(breakpoint_ids)
+
+ # Check already resolved breakpoints
+ resolved_breakpoints = self.dap_server.request_testGetTargetBreakpoints(
+ only_resolved=True
+ )["body"]["breakpoints"]
+ for resolved_breakpoint in resolved_breakpoints:
+ unresolved_breakpoints.discard(str(resolved_breakpoint["id"]))
----------------
ashgti wrote:
I think if the we kept track of the client state in the DebugCommunication class we wouldn't need to make this custom request.
https://github.com/llvm/llvm-project/pull/140470
More information about the lldb-commits
mailing list