Fix infinite hang if GDB client kills gdbstub
This commit is contained in:
parent
83138e0c63
commit
351730d585
1 changed files with 5 additions and 2 deletions
|
@ -1066,12 +1066,15 @@ void HandlePacket() {
|
||||||
SendSignal(current_thread, latest_signal);
|
SendSignal(current_thread, latest_signal);
|
||||||
break;
|
break;
|
||||||
case 'k':
|
case 'k':
|
||||||
Shutdown();
|
ToggleServer(false);
|
||||||
|
// Continue execution so we don't hang forever after shutting down the
|
||||||
|
// server
|
||||||
|
Continue();
|
||||||
LOG_INFO(Debug_GDBStub, "killed by gdb");
|
LOG_INFO(Debug_GDBStub, "killed by gdb");
|
||||||
return;
|
return;
|
||||||
case 'F':
|
case 'F':
|
||||||
if (HandleHioReply(command_buffer, command_length)) {
|
if (HandleHioReply(command_buffer, command_length)) {
|
||||||
// TODO: technically if we were paused when the reply came in, we
|
// TODO: technically if we were paused when the request came in, we
|
||||||
// shouldn't continue here. Could recurse back into HandlePacket() maybe??
|
// shouldn't continue here. Could recurse back into HandlePacket() maybe??
|
||||||
Continue();
|
Continue();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue