[llvm-branch-commits] [llvm] [Dexter] Allow fetching "scopes" from the debugger (PR #202802)

Stephen Tozer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 16 06:54:54 PDT 2026


================
@@ -555,15 +555,22 @@ def _await_response(self, seq: int, timeout: float = 0.0) -> dict:
     # response when it arrives. An optional timeout for the response may be passed.
     # If allow_failure is passed, then the result may instead be a str containing the fail reason if the request failed.
     def _communicate_request(
-        self, command: str, arguments=None, timeout: float = 60.0, allow_failure=False
+        self, command: str, arguments=None, timeout: float = 60.0
+    ) -> Dict:
+        req_id = self.send_message(self.make_request(command, arguments))
+        response = self._await_response(req_id, timeout)
+        if not response["success"]:
+            raise DebuggerException(
+                f"received failure response for command {command}: {response['message']}"
+            )
+        return response["body"]
+
+    def _communicate_fallible_request(
----------------
SLTozer wrote:

Purely a convenience of type checking - the fallible method may return a string (representing an error), the non-fallible method always returns a dict (an actual result) if it doesn't throw.

https://github.com/llvm/llvm-project/pull/202802


More information about the llvm-branch-commits mailing list