You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOG_TARGET_DEBUG(target, "Watchpoint %d: cleared=%"PRId64, i, state[i]);
if (state[i]) {
if (riscv_add_watchpoint(target, watchpoint) !=ERROR_OK)
returnERROR_FAIL;
}
watchpoint=watchpoint->next;
i++;
}
Now consider the following situation:
A target has 2 triggers. The 1-st trigger supports configurations required by WP 1, WP 2, WP 3. The 2-nd trigger only supports configuration required by WP-2.
The users sets WP 1. WP 1 occupies the 1-st trigger.
The user sets WP 2. WP 2 occupies the 2-nd trigger,
The user removes WP 1, the 1-st trigger is free.
The user sets WP 3. WP 3 occupies the 1-st trigger.
The situation is as follows:
taget->watchpoints points to WP 2.
taget->watchpoints->next points to WP 3.
disable_triggers() is called (e.g. during step).
enable_triggers() will try to re-enable the disabled WP, but will fail, since WP 2 will occupy 1-st trigger and 2-nd triggerdoes not support WP 3.
The text was updated successfully, but these errors were encountered:
Currently,
disable_triggers()
just goes through all the WPs and disables them one-by-one (the case whenr->manual_hwbp_set
isfalse
):riscv-openocd/src/target/riscv/riscv.c
Lines 2487 to 2499 in 5afed58
enable_triggers()
works accordingly:riscv-openocd/src/target/riscv/riscv.c
Lines 2526 to 2536 in 5afed58
Now consider the following situation:
taget->watchpoints
points to WP 2.taget->watchpoints->next
points to WP 3.disable_triggers()
is called (e.g. duringstep
).enable_triggers()
will try to re-enable the disabled WP, but will fail, since WP 2 will occupy 1-st trigger and 2-nd triggerdoes not support WP 3.The text was updated successfully, but these errors were encountered: