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.
This commit is contained in:
MerryMage 2020-04-06 21:24:54 +01:00
parent 3b1b8b7e1f
commit d17ab5cd91
2 changed files with 7 additions and 4 deletions

View file

@ -1264,10 +1264,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;
}