================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to