Skip to content

Commit

Permalink
add diagnostics for non-implemented data watchpoints
Browse files Browse the repository at this point in the history
Change-Id: If5031c6d8cea1bfcc34bb65fd766f232498ed7ea
Signed-off-by: Parshintsev Anatoly <[email protected]>
  • Loading branch information
aap-sc committed Aug 1, 2023
1 parent ee5c5c2 commit f36ae13
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit f36ae13

Please sign in to comment.