Added warning when GDB client sends invalid packet
This commit is contained in:
@@ -122,17 +122,20 @@ namespace Bloom::DebugServer::Gdb
|
|||||||
rawPacket.push_back(byte);
|
rawPacket.push_back(byte);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (validPacket) {
|
if (!validPacket) {
|
||||||
// Acknowledge receipt
|
Logger::warning("GDB client sent invalid packet data - ignoring");
|
||||||
this->write({'+'});
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Logger::debug("Read GDB packet: " + std::string(rawPacket.begin(), rawPacket.end()));
|
Logger::debug("Read GDB packet: " + std::string(rawPacket.begin(), rawPacket.end()));
|
||||||
|
|
||||||
|
// Acknowledge receipt
|
||||||
|
this->write({'+'});
|
||||||
|
|
||||||
output.emplace_back(std::move(rawPacket));
|
output.emplace_back(std::move(rawPacket));
|
||||||
byteIndex = packetIndex;
|
byteIndex = packetIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
} while (output.empty());
|
} while (output.empty());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user