From 1cc9507bc55059ae82d525f245eeb3b3de873223 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 6 Apr 2020 21:24:54 +0100 Subject: gdbstub: Fix some gdbstub jankiness 1. Ensure that register information available to gdbstub is most up-to-date. 2. There's no reason to check for current_thread == thread when emitting a trap. Doing this results in random hangs whenever a step happens upon a thread switch. --- src/core/gdbstub/gdbstub.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index 6d15aeed9..6f51895b9 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp @@ -1389,10 +1389,9 @@ void SendTrap(Kernel::Thread* thread, int trap) { return; } - if (!halt_loop || current_thread == thread) { - current_thread = thread; - SendSignal(thread, trap); - } + current_thread = thread; + SendSignal(thread, trap); + halt_loop = true; send_trap = false; } -- cgit v1.2.3