breakpoints: use 64-bit type for watchpoint mask and value
This patch changes data types of watchpoint value and mask to allow for 64-bit values match that some architectures (like RISCV) allow. In addition this patch fixes the behavior of watchpoint command to zero-out mask if only data value is provided. Change-Id: I3c7ec1630f03ea9534ec34c0ebe99e08ea56e7f0 Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7840 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Marek Vrbka <marek.vrbka@codasip.com> Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Tomas Vanek
parent
2ca6d25eb5
commit
2cd8ebf44d
@@ -451,6 +451,7 @@ static int arm7_9_set_watchpoint(struct target *target, struct watchpoint *watch
|
||||
struct arm7_9_common *arm7_9 = target_to_arm7_9(target);
|
||||
int rw_mask = 1;
|
||||
uint32_t mask;
|
||||
const uint32_t wp_data_mask = watchpoint->mask;
|
||||
|
||||
mask = watchpoint->length - 1;
|
||||
|
||||
@@ -469,8 +470,8 @@ static int arm7_9_set_watchpoint(struct target *target, struct watchpoint *watch
|
||||
watchpoint->address);
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W0_ADDR_MASK], mask);
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W0_DATA_MASK],
|
||||
watchpoint->mask);
|
||||
if (watchpoint->mask != 0xffffffffu)
|
||||
wp_data_mask);
|
||||
if (wp_data_mask != (uint32_t)WATCHPOINT_IGNORE_DATA_VALUE_MASK)
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W0_DATA_VALUE],
|
||||
watchpoint->value);
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W0_CONTROL_MASK],
|
||||
@@ -488,8 +489,8 @@ static int arm7_9_set_watchpoint(struct target *target, struct watchpoint *watch
|
||||
watchpoint->address);
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W1_ADDR_MASK], mask);
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W1_DATA_MASK],
|
||||
watchpoint->mask);
|
||||
if (watchpoint->mask != 0xffffffffu)
|
||||
wp_data_mask);
|
||||
if (wp_data_mask != (uint32_t)WATCHPOINT_IGNORE_DATA_VALUE_MASK)
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W1_DATA_VALUE],
|
||||
watchpoint->value);
|
||||
embeddedice_set_reg(&arm7_9->eice_cache->reg_list[EICE_W1_CONTROL_MASK],
|
||||
|
||||
Reference in New Issue
Block a user