If multiple read watchpoints are hit at the same time, report
any one of these hit watchpoints.
Change-Id: I8d4439aa80e4b62bb7d48bbdc0450920e2008a2e
Signed-off-by: Hsiangkai Wang <hsiangkai@gmail.com>
Reviewed-on: http://openocd.zylin.com/1576
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
uint32_t match_count;
int32_t i;
static int32_t number_of_hard_break;
+ uint32_t bp_control;
if (number_of_hard_break == 0) {
aice_read_debug_reg(aice, NDS_EDM_SR_EDM_CFG, &edm_cfg);
if (match_bits & (1 << i)) {
aice_read_debug_reg(aice, NDS_EDM_SR_BPA0 + i, address);
match_count++;
+
+ /* If target hits multiple read/access watchpoint,
+ * select the first one. */
+ aice_read_debug_reg(aice, NDS_EDM_SR_BPC0 + i, &bp_control);
+ if (0x3 == (bp_control & 0x3)) {
+ match_count = 1;
+ break;
+ }
}
}