Fixed bug in GDB Connection::read() function, where timeouts where being incorrectly treated as interrupts.

This commit is contained in:
Nav
2022-04-16 21:20:13 +01:00
parent a8c78dc86a
commit 3f368b10e7

View File

@@ -200,10 +200,12 @@ namespace Bloom::DebugServer::Gdb
const auto eventFileDescriptor = this->epollInstance.waitForEvent(timeout);
if (
!eventFileDescriptor.has_value()
|| eventFileDescriptor.value() == this->interruptEventNotifier.getFileDescriptor()
) {
if (!eventFileDescriptor.has_value()) {
// Timed out
return output;
}
if (eventFileDescriptor.value() == this->interruptEventNotifier.getFileDescriptor()) {
// Interrupted
this->interruptEventNotifier.clear();
throw DebugServerInterrupted();