target: Add possibility to remove all breakpoints
Change-Id: I46acd57956846d66bef974e0538452462b197cd0 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/4916 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
9960e805b3
commit
5ceae0eef4
|
@ -8173,8 +8173,8 @@ in which case it will be a hardware breakpoint.
|
||||||
for similar mechanisms that do not consume hardware breakpoints.)
|
for similar mechanisms that do not consume hardware breakpoints.)
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command {rbp} address
|
@deffn Command {rbp} @option{all} | address
|
||||||
Remove the breakpoint at @var{address}.
|
Remove the breakpoint at @var{address} or all breakpoints.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Command {rwp} address
|
@deffn Command {rwp} address
|
||||||
|
|
|
@ -3829,11 +3829,16 @@ COMMAND_HANDLER(handle_rbp_command)
|
||||||
if (CMD_ARGC != 1)
|
if (CMD_ARGC != 1)
|
||||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||||
|
|
||||||
target_addr_t addr;
|
|
||||||
COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
|
|
||||||
|
|
||||||
struct target *target = get_current_target(CMD_CTX);
|
struct target *target = get_current_target(CMD_CTX);
|
||||||
breakpoint_remove(target, addr);
|
|
||||||
|
if (!strcmp(CMD_ARGV[0], "all")) {
|
||||||
|
breakpoint_remove_all(target);
|
||||||
|
} else {
|
||||||
|
target_addr_t addr;
|
||||||
|
COMMAND_PARSE_ADDRESS(CMD_ARGV[0], addr);
|
||||||
|
|
||||||
|
breakpoint_remove(target, addr);
|
||||||
|
}
|
||||||
|
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
@ -6318,7 +6323,7 @@ static const struct command_registration target_exec_command_handlers[] = {
|
||||||
.handler = handle_rbp_command,
|
.handler = handle_rbp_command,
|
||||||
.mode = COMMAND_EXEC,
|
.mode = COMMAND_EXEC,
|
||||||
.help = "remove breakpoint",
|
.help = "remove breakpoint",
|
||||||
.usage = "address",
|
.usage = "'all' | address",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "wp",
|
.name = "wp",
|
||||||
|
|
Loading…
Reference in New Issue