[Lldb-commits] [lldb] [lldb-dap] Adding exception handling for dap server disconnect and terminations in lldbdap_testcase.py (PR #155335)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 9 11:21:45 PDT 2025


================
@@ -450,6 +450,20 @@ def disassemble(self, threadId=None, frameIndex=None):
 
         return disassembled_instructions, disassembled_instructions[memoryReference]
 
+    def dapCleanup(self, disconnectAutomatically):
+        if disconnectAutomatically:
+            try:
----------------
ashgti wrote:

If they're in LIFO, then couldn't we just swap the order like:
```
def _dapCleanup(self, disconnectAutomatically: bool):
  self.addTearDownHook(self.dap_server.terminate)
  if disconnectAutomatically:
      self.addTearDownHook(lambda: self.dap_server.request_disconnect(terminateDebuggee=True))
```

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


More information about the lldb-commits mailing list