Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add diagnostics for non-implemented data watchpoints #897

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/target/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,14 @@ 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) {
LOG_TARGET_ERROR(target, "Watchpoints on data values are not implemented");
return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
}

struct trigger trigger;
trigger_from_watchpoint(&trigger, watchpoint);

Expand Down
Loading