Merge pull request #5185 from MerryMage/fix-gdbstub

gdbstub: Fix some gdbstub jankiness
This commit is contained in:
Hamish Milne 2020-04-16 23:52:00 +01:00 committed by GitHub
commit 9afd58cec2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -50,6 +50,10 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
}
if (GDBStub::IsServerEnabled()) {
Kernel::Thread* thread = kernel->GetCurrentThreadManager().GetCurrentThread();
if (thread && running_core) {
running_core->SaveContext(thread->context);
}
GDBStub::HandlePacket();
// If the loop is halted and we want to step, use a tiny (1) number of instructions to