Support for hardware breakpoints

This commit is contained in:
Nav
2023-09-20 23:37:54 +01:00
parent df5a141089
commit d7b59cac59
24 changed files with 480 additions and 68 deletions

View File

@@ -218,12 +218,15 @@ namespace Services
);
}
void TargetControllerService::setBreakpoint(TargetBreakpoint breakpoint) const {
this->commandManager.sendCommandAndWaitForResponse(
std::make_unique<SetBreakpoint>(breakpoint),
Targets::TargetBreakpoint TargetControllerService::setBreakpoint(
Targets::TargetMemoryAddress address,
Targets::TargetBreakpoint::Type preferredType
) const {
return this->commandManager.sendCommandAndWaitForResponse(
std::make_unique<SetBreakpoint>(address, preferredType),
this->defaultTimeout,
this->activeAtomicSessionId
);
)->breakpoint;
}
void TargetControllerService::removeBreakpoint(TargetBreakpoint breakpoint) const {

View File

@@ -142,9 +142,16 @@ namespace Services
/**
* Requests the TargetController to set a breakpoint on the target.
*
* @param breakpoint
* @param address
* @param preferredType
*
* @return
* The installed breakpoint.
*/
void setBreakpoint(Targets::TargetBreakpoint breakpoint) const;
Targets::TargetBreakpoint setBreakpoint(
Targets::TargetMemoryAddress address,
Targets::TargetBreakpoint::Type preferredType = Targets::TargetBreakpoint::Type::HARDWARE
) const;
/**
* Requests the TargetController to remove a breakpoint from the target.