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); const auto eventFileDescriptor = this->epollInstance.waitForEvent(timeout);
if ( if (!eventFileDescriptor.has_value()) {
!eventFileDescriptor.has_value() // Timed out
|| eventFileDescriptor.value() == this->interruptEventNotifier.getFileDescriptor() return output;
) { }
if (eventFileDescriptor.value() == this->interruptEventNotifier.getFileDescriptor()) {
// Interrupted // Interrupted
this->interruptEventNotifier.clear(); this->interruptEventNotifier.clear();
throw DebugServerInterrupted(); throw DebugServerInterrupted();