diff mbox series

[07/14] gdbserver: fix interrupt double response

Message ID 20220314041735.542867-9-npiggin@gmail.com
State New
Headers show
Series gdbserver fixes and POWER10 support | expand

Commit Message

Nicholas Piggin March 14, 2022, 4:17 a.m. UTC
Interrupt should not send a TRAP response, that should only be sent
when the thread is stopped, which is what the main loop does after
the interrupt performs the thread stop.

Removing this prevents two TRAP responses being sent to the client
after an interrupt.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 src/pdbgproxy.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/pdbgproxy.c b/src/pdbgproxy.c
index 78b1236..ce52e9d 100644
--- a/src/pdbgproxy.c
+++ b/src/pdbgproxy.c
@@ -320,11 +320,8 @@  static void v_contc(uint64_t *stack, void *priv)
 
 static void interrupt(uint64_t *stack, void *priv)
 {
-	PR_INFO("Interrupt\n");
+	PR_INFO("Interrupt from gdb client\n");
 	thread_stop(thread_target);
-	send_response(fd, TRAP);
-
-	return;
 }
 
 static void poll(void)