aboutsummaryrefslogtreecommitdiff
path: root/src/target/breakpoints.h
diff options
context:
space:
mode:
authorParshintsev Anatoly <anatoly.parshintsev@syntacore.com>2023-07-28 20:41:32 +0300
committerTomas Vanek <vanekt@fbl.cz>2023-08-08 06:11:01 +0000
commit2cd8ebf44d1afd59b524b09561a8bd2f90f0c27a (patch)
treec6edbb73c0d14ce6cd4317fdca89395c9393002a /src/target/breakpoints.h
parent2ca6d25eb561d114d3a37ace0922a738e19fcc79 (diff)
downloadriscv-openocd-2cd8ebf44d1afd59b524b09561a8bd2f90f0c27a.zip
riscv-openocd-2cd8ebf44d1afd59b524b09561a8bd2f90f0c27a.tar.gz
riscv-openocd-2cd8ebf44d1afd59b524b09561a8bd2f90f0c27a.tar.bz2
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>
Diffstat (limited to 'src/target/breakpoints.h')
-rw-r--r--src/target/breakpoints.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/target/breakpoints.h b/src/target/breakpoints.h
index a9ae484..d447515 100644
--- a/src/target/breakpoints.h
+++ b/src/target/breakpoints.h
@@ -36,11 +36,13 @@ struct breakpoint {
int linked_brp;
};
+#define WATCHPOINT_IGNORE_DATA_VALUE_MASK (~(uint64_t)0)
+
struct watchpoint {
target_addr_t address;
uint32_t length;
- uint32_t mask;
- uint32_t value;
+ uint64_t mask;
+ uint64_t value;
enum watchpoint_rw rw;
bool is_set;
unsigned int number;
@@ -69,7 +71,7 @@ static inline void breakpoint_hw_set(struct breakpoint *breakpoint, unsigned int
void watchpoint_clear_target(struct target *target);
int watchpoint_add(struct target *target,
target_addr_t address, uint32_t length,
- enum watchpoint_rw rw, uint32_t value, uint32_t mask);
+ enum watchpoint_rw rw, uint64_t value, uint64_t mask);
void watchpoint_remove(struct target *target, target_addr_t address);
/* report type and address of just hit watchpoint */