aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
diff options
context:
space:
mode:
authoreleviant <56861949+eleviant@users.noreply.github.com>2025-06-21 22:48:08 +0200
committerGitHub <noreply@github.com>2025-06-21 22:48:08 +0200
commite066f35c6981c720e3a7e5883efc40c861b3b7ee (patch)
tree7c06f95fd30a8283fcefaa03f77c3a9d7a6ac62e /lldb/packages/Python/lldbsuite/test/gdbclientutils.py
parent056b52df344f688fd3831a07bc477f77f883a696 (diff)
downloadllvm-e066f35c6981c720e3a7e5883efc40c861b3b7ee.zip
llvm-e066f35c6981c720e3a7e5883efc40c861b3b7ee.tar.gz
llvm-e066f35c6981c720e3a7e5883efc40c861b3b7ee.tar.bz2
[lldb] Fix qEcho message handling (#145072)
Patch fixes the sync-on-timeout logic in lldb and switches to qEcho based ping, instead of qC. This fixes vRun message case, when there is no process yet and qC returns an error.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/gdbclientutils.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/gdbclientutils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
index 753de22..b603c35 100644
--- a/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
+++ b/lldb/packages/Python/lldbsuite/test/gdbclientutils.py
@@ -92,6 +92,9 @@ class MockGDBServerResponder:
class RESPONSE_DISCONNECT:
pass
+ class RESPONSE_NONE:
+ pass
+
def __init__(self):
self.packetLog = []
@@ -181,6 +184,8 @@ class MockGDBServerResponder:
return self.qQueryGDBServer()
if packet == "qHostInfo":
return self.qHostInfo()
+ if packet.startswith("qEcho"):
+ return self.qEcho(int(packet.split(":")[1]))
if packet == "qGetWorkingDir":
return self.qGetWorkingDir()
if packet == "qOffsets":
@@ -237,6 +242,9 @@ class MockGDBServerResponder:
def qHostInfo(self):
return "ptrsize:8;endian:little;"
+ def qEcho(self):
+ return "E04"
+
def qQueryGDBServer(self):
return "E04"
@@ -655,6 +663,8 @@ class MockGDBServer:
if not isinstance(response, list):
response = [response]
for part in response:
+ if part is MockGDBServerResponder.RESPONSE_NONE:
+ continue
if part is MockGDBServerResponder.RESPONSE_DISCONNECT:
raise self.TerminateConnectionException()
self._sendPacket(part)