breakpoints: Add target logging to breakpoints and watchpoints
This patch adds target logging to breakpoint handling code. This makes it easier to debug multicore/multithread systems. Change-Id: I6bea8079a457070a8f63d0ce381a4ece6f5a190a Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7922 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Antonio Borneo
parent
7c60f6593e
commit
851d1ad87a
+4
-4
@@ -3974,7 +3974,7 @@ static int handle_bp_command_set(struct command_invocation *cmd,
|
||||
|
||||
} else if (addr == 0) {
|
||||
if (!target->type->add_context_breakpoint) {
|
||||
LOG_ERROR("Context breakpoint not available");
|
||||
LOG_TARGET_ERROR(target, "Context breakpoint not available");
|
||||
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
|
||||
}
|
||||
retval = context_breakpoint_add(target, asid, length, hw);
|
||||
@@ -3984,7 +3984,7 @@ static int handle_bp_command_set(struct command_invocation *cmd,
|
||||
|
||||
} else {
|
||||
if (!target->type->add_hybrid_breakpoint) {
|
||||
LOG_ERROR("Hybrid breakpoint not available");
|
||||
LOG_TARGET_ERROR(target, "Hybrid breakpoint not available");
|
||||
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
|
||||
}
|
||||
retval = hybrid_breakpoint_add(target, addr, asid, length, hw);
|
||||
@@ -4121,7 +4121,7 @@ COMMAND_HANDLER(handle_wp_command)
|
||||
type = WPT_ACCESS;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("invalid watchpoint mode ('%c')", CMD_ARGV[2][0]);
|
||||
LOG_TARGET_ERROR(target, "invalid watchpoint mode ('%c')", CMD_ARGV[2][0]);
|
||||
return ERROR_COMMAND_SYNTAX_ERROR;
|
||||
}
|
||||
/* fall through */
|
||||
@@ -4137,7 +4137,7 @@ COMMAND_HANDLER(handle_wp_command)
|
||||
int retval = watchpoint_add(target, addr, length, type,
|
||||
data_value, data_mask);
|
||||
if (retval != ERROR_OK)
|
||||
LOG_ERROR("Failure setting watchpoints");
|
||||
LOG_TARGET_ERROR(target, "Failure setting watchpoints");
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user