================
@@ -450,6 +450,20 @@ def disassemble(self, threadId=None, frameIndex=None):
return disassembled_instructions,
disassembled_instructions[memoryReference]
+ def dapCleanup(self, disconnectAutomatically):
+ if disconnectAutomatically:
+ try:
----------------
dmpots wrote:
This is swallowing any exceptions that can occur in either `request_disconnect`
or `terminate`, which is different behavior than the version originally
approved by @walter-erquinigo and @ashgti.
@piyushjaiswal98 says that the teardown hooks are actually processed in LIFO
order instead of FIFO order as expected which is why he changed it to catching
them. Is there a better way to handle the exceptions here?
Can we use try-finally instead?
```
def dapCleanup(self, disconnectAutomatically):
try:
if disconnectAutomatically:
self.dap_server.request_disconnect(terminateDebuggee=True)
finally:
self.dap_server.terminate()
```
https://github.com/llvm/llvm-project/pull/155335
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits