Merge pull request #955 from MarekVCodasip/use-watchpoint-mask-macro

target/riscv: Replace watchpoint value mask comparison value with macro.
This commit is contained in:
Tim Newsome 2023-11-09 08:54:47 -08:00 committed by GitHub
commit 6f028846a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -1375,10 +1375,7 @@ static void trigger_from_watchpoint(struct trigger *trigger,
int riscv_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
{
// NOTE: typeof is needed because of upstream OpenOCD bug. This should be
// replaced by WATCHPOINT_IGNORE_DATA_VALUE_MASK once it is available
// See: https://review.openocd.org/c/openocd/+/7840
if (watchpoint->mask != ~(typeof(watchpoint->mask))0) {
if (watchpoint->mask != WATCHPOINT_IGNORE_DATA_VALUE_MASK) {
LOG_TARGET_ERROR(target, "Watchpoints on data values are not implemented");
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}