gdbserver.py: if thread < 0, need set to 0

Fix unexpected thread values

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao
2024-12-23 15:33:12 +08:00
committed by Xiang Xiao
parent 4063f4b207
commit 3833dea6a4
+1 -1
View File
@@ -819,7 +819,7 @@ class GDBStub:
elif b"c" == pkt[1:2]:
thread = int(pkt[2:]) - 1
if thread == -1:
if thread < 0:
thread = 0
self.current_thread = thread