Improved RAII of DebugSession class

This commit is contained in:
Nav
2022-08-13 03:06:30 +01:00
parent d59c4f92ba
commit 2372b93e11
5 changed files with 26 additions and 37 deletions

View File

@@ -102,7 +102,7 @@ the [GDB debug server implementation](../DebugServer/Gdb/README.md) will termina
void GdbRspDebugServer::onTargetControllerStateChanged(const Events::TargetControllerStateChanged& event) {
if (event.state == TargetControllerState::SUSPENDED && this->activeDebugSession.has_value()) {
Logger::warning("TargetController suspended unexpectedly - terminating debug session");
this->terminateActiveDebugSession();
this->activeDebugSession.reset();
}
}
```