This commit is contained in:
Nav
2021-06-05 22:43:03 +01:00
parent a7d3e44436
commit 02446116df
6 changed files with 16 additions and 28 deletions

View File

@@ -119,9 +119,10 @@ void GdbRspDebugServer::serve() {
if (!this->clientConnection.has_value()) {
Logger::info("Waiting for GDB RSP connection");
while (!this->clientConnection.has_value()) {
do {
this->waitForConnection();
}
} while (!this->clientConnection.has_value());
this->clientConnection->accept(this->serverSocketFileDescriptor);
Logger::info("Accepted GDP RSP connection from " + this->clientConnection->getIpAddress());
@@ -334,8 +335,8 @@ void GdbRspDebugServer::handleGdbPacket(CommandPackets::WriteGeneralRegisters& p
try {
auto registerDescriptor = this->getRegisterDescriptorFromNumber(packet.registerNumber);
this->targetControllerConsole.writeGeneralRegisters({
TargetRegister(registerDescriptor, packet.registerValue)
});
TargetRegister(registerDescriptor, packet.registerValue)
});
this->clientConnection->writePacket(ResponsePacket({'O', 'K'}));
} catch (const Exception& exception) {

View File

@@ -21,7 +21,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
class Avr8: public Target
{
protected:
DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* avr8Interface;
DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* avr8Interface = nullptr;
std::string name = "";
std::optional<Family> family;
std::optional<TargetDescription::TargetDescriptionFile> targetDescriptionFile;

View File

@@ -162,7 +162,7 @@ namespace Bloom::Targets
* Once at least one of the above conditions are met, the TargetController will break out of the loop and use
* the last promoted target instance from there onwards.
*
* See TargetController::startup() for more on this.
* See TargetController::acquireHardware() for more on this.
*
* @return
*/