Made VCont step/continue command handlers generic (non-target-specific)
This commit is contained in:
@@ -25,6 +25,8 @@ target_sources(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/CommandPackets/ListRegistersMonitor.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/CommandPackets/ReadRegistersMonitor.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/CommandPackets/WriteRegisterMonitor.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/CommandPackets/VContContinueExecution.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/CommandPackets/VContStepExecution.cpp
|
||||
|
||||
# AVR GDB RSP Server
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/AvrGdbRsp.cpp
|
||||
@@ -39,8 +41,6 @@ target_sources(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/FlashDone.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/VContContinueExecution.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/VContStepExecution.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Gdb/AvrGdb/CommandPackets/EepromFill.cpp
|
||||
)
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
#include "CommandPackets/FlashWrite.hpp"
|
||||
#include "CommandPackets/FlashDone.hpp"
|
||||
#include "CommandPackets/VContSupportedActionsQuery.hpp"
|
||||
#include "CommandPackets/VContContinueExecution.hpp"
|
||||
#include "CommandPackets/VContStepExecution.hpp"
|
||||
#include "CommandPackets/VContRangeStep.hpp"
|
||||
|
||||
#include "src/DebugServer/Gdb/CommandPackets/Monitor.hpp"
|
||||
@@ -56,8 +54,6 @@ namespace DebugServer::Gdb::AvrGdb
|
||||
using CommandPackets::FlashWrite;
|
||||
using CommandPackets::FlashDone;
|
||||
using CommandPackets::VContSupportedActionsQuery;
|
||||
using CommandPackets::VContContinueExecution;
|
||||
using CommandPackets::VContStepExecution;
|
||||
using CommandPackets::VContRangeStep;
|
||||
using CommandPackets::EepromFill;
|
||||
|
||||
@@ -108,14 +104,6 @@ namespace DebugServer::Gdb::AvrGdb
|
||||
return std::make_unique<VContSupportedActionsQuery>(rawPacket);
|
||||
}
|
||||
|
||||
if (rawPacketString.find("vCont;c") == 0 || rawPacketString.find("vCont;C") == 0) {
|
||||
return std::make_unique<VContContinueExecution>(rawPacket);
|
||||
}
|
||||
|
||||
if (rawPacketString.find("vCont;s") == 0 || rawPacketString.find("vCont;S") == 0) {
|
||||
return std::make_unique<VContStepExecution>(rawPacket);
|
||||
}
|
||||
|
||||
if (this->debugServerConfig.rangeStepping) {
|
||||
if (rawPacketString.find("vCont;r") == 0) {
|
||||
return std::make_unique<VContRangeStep>(rawPacket);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
||||
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
|
||||
void VContContinueExecution::handle(
|
||||
DebugSession& debugSession,
|
||||
const AvrGdbTargetDescriptor& gdbTargetDescriptor,
|
||||
const TargetDescriptor& gdbTargetDescriptor,
|
||||
const Targets::TargetDescriptor& targetDescriptor,
|
||||
TargetControllerService& targetControllerService
|
||||
) {
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
#include "CommandPacket.hpp"
|
||||
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The VContContinueExecution class implements a structure for "vCont;c" and "vCont;C" packets. These packets
|
||||
* instruct the server to continue execution on the target.
|
||||
*/
|
||||
class VContContinueExecution: public CommandPackets::CommandPacket
|
||||
class VContContinueExecution: public CommandPacket
|
||||
{
|
||||
public:
|
||||
explicit VContContinueExecution(const RawPacket& rawPacket);
|
||||
|
||||
void handle(
|
||||
DebugSession& debugSession,
|
||||
const AvrGdbTargetDescriptor& gdbTargetDescriptor,
|
||||
const TargetDescriptor& gdbTargetDescriptor,
|
||||
const Targets::TargetDescriptor& targetDescriptor,
|
||||
Services::TargetControllerService& targetControllerService
|
||||
) override;
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "src/DebugServer/Gdb/ResponsePackets/ErrorResponsePacket.hpp"
|
||||
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
using Services::TargetControllerService;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
|
||||
void VContStepExecution::handle(
|
||||
DebugSession& debugSession,
|
||||
const AvrGdbTargetDescriptor& gdbTargetDescriptor,
|
||||
const TargetDescriptor& gdbTargetDescriptor,
|
||||
const Targets::TargetDescriptor& targetDescriptor,
|
||||
TargetControllerService& targetControllerService
|
||||
) {
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
#include "CommandPacket.hpp"
|
||||
|
||||
namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
||||
namespace DebugServer::Gdb::CommandPackets
|
||||
{
|
||||
/**
|
||||
* The VContStepExecution class implements a structure for "vCont;s" and "vCont;S" packets.
|
||||
*/
|
||||
class VContStepExecution: public CommandPackets::CommandPacket
|
||||
class VContStepExecution: public CommandPacket
|
||||
{
|
||||
public:
|
||||
explicit VContStepExecution(const RawPacket& rawPacket);
|
||||
|
||||
void handle(
|
||||
DebugSession& debugSession,
|
||||
const AvrGdbTargetDescriptor& gdbTargetDescriptor,
|
||||
const TargetDescriptor& gdbTargetDescriptor,
|
||||
const Targets::TargetDescriptor& targetDescriptor,
|
||||
Services::TargetControllerService& targetControllerService
|
||||
) override;
|
||||
@@ -60,6 +60,8 @@
|
||||
#include "CommandPackets/ListRegistersMonitor.hpp"
|
||||
#include "CommandPackets/ReadRegistersMonitor.hpp"
|
||||
#include "CommandPackets/WriteRegisterMonitor.hpp"
|
||||
#include "CommandPackets/VContContinueExecution.hpp"
|
||||
#include "CommandPackets/VContStepExecution.hpp"
|
||||
|
||||
#ifndef EXCLUDE_INSIGHT
|
||||
#include "CommandPackets/ActivateInsight.hpp"
|
||||
@@ -441,6 +443,14 @@ namespace DebugServer::Gdb
|
||||
return std::make_unique<CommandPackets::SupportedFeaturesQuery>(rawPacket);
|
||||
}
|
||||
|
||||
if (rawPacketString.find("vCont;c") == 0 || rawPacketString.find("vCont;C") == 0) {
|
||||
return std::make_unique<CommandPackets::VContContinueExecution>(rawPacket);
|
||||
}
|
||||
|
||||
if (rawPacketString.find("vCont;s") == 0 || rawPacketString.find("vCont;S") == 0) {
|
||||
return std::make_unique<CommandPackets::VContStepExecution>(rawPacket);
|
||||
}
|
||||
|
||||
if (rawPacketString.find("qRcmd") == 0) {
|
||||
// This is a monitor packet
|
||||
auto monitorCommand = std::make_unique<CommandPackets::Monitor>(rawPacket);
|
||||
|
||||
Reference in New Issue
Block a user