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
When using mcontrol6, spike breaks after the watchpoint is hit. But openocd only checks if the watchpoint is hit and not the other bit also which indicates when the said watchpoint was hit. Subsequently, openocd assumes that the watchpoint is always hit before and sets the step bit in dcsr which ultimately results in control being returned after one more instruction.
The text was updated successfully, but these errors were encountered:
LOG_TARGET_DEBUG(target, "Trigger %u (unique_id=%"PRIi64") has hit bit set.",
i, r->trigger_unique_id[i]);
if (riscv_reg_set(target, GDB_REGNO_TDATA1, tdata1& ~hit_mask) !=ERROR_OK)
returnERROR_FAIL;
*unique_id=r->trigger_unique_id[i];
break;
}
Subsequently, openocd assumes that the watchpoint is always hit before and sets the step bit in dcsr which ultimately results in control being returned after one more instruction.
Yes, OpenOCD always steps from a breakpoint or a watchpoint. There is #1144 aiming to address this issue.
Moreover, I'm not checking hit field to skip the step worth it. The thing is, hit field is optional. Therefore, making sure OpenOCD does step from a trigger when the trigger was hit with a timing before requires a lot of communication with the target and maybe always stepping is simpler and faster.
When using mcontrol6, spike breaks after the watchpoint is hit. But openocd only checks if the watchpoint is hit and not the other bit also which indicates when the said watchpoint was hit. Subsequently, openocd assumes that the watchpoint is always hit before and sets the step bit in dcsr which ultimately results in control being returned after one more instruction.
The text was updated successfully, but these errors were encountered: