diff options
author | Chengyu Zheng <chengyu.zheng@polimi.it> | 2016-12-14 12:18:10 +0100 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2021-06-03 23:26:35 +0100 |
commit | 1fb736f6c5a69f743dd90e68045f7b4e6a0f8c78 (patch) | |
tree | cccf3590c1eb22aaa79e94cd630b0ac6c070e692 /src/target/armv7a.c | |
parent | b40dc09dd9e05497bf956ca91f7153aa34b24854 (diff) | |
download | riscv-openocd-1fb736f6c5a69f743dd90e68045f7b4e6a0f8c78.zip riscv-openocd-1fb736f6c5a69f743dd90e68045f7b4e6a0f8c78.tar.gz riscv-openocd-1fb736f6c5a69f743dd90e68045f7b4e6a0f8c78.tar.bz2 |
target/cortex_a: add support for watchpoints
The current implementation of OpenOCD does not support watchpoints for
cortex_a architecture. So, I replaced the add_watchpoint and
remove_watchpoint with the specific implementation for the
cortex a and using the breakpoint implementation and the arm
documentation [1] as reference. In particular, I have made the
following changes:
* added the following functions
- cortex_a_add_watchpoint
This wrapper function check whether there are any watchpoint
available on the target device by calling cortex_a_set_watchpoint.
- cortex_a_set_watchpoint
This function is responsible for settings the watchpoint register
pair. In particular, it sets the WVR and the WCR registers with
the cortex_a_dap command.
- cortex_a_remove_watchpoint
This wrapper function the selected watchpoint on the target device
by calling cortex_a_unset_watchpoint.
- cortex_a_unset_watchpoint
This function sets both the WVR and the WCR registers to zero, thus
unsetting the watchpoint.
[1]
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0464f/BCGDHIEJ.html
Change-Id: I86611dab474cb84836662af572b17636dc68e282
Signed-off-by: Chengyu Zheng <chengyu.zheng@polimi.it>
Reviewed-on: http://openocd.zylin.com/3913
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Marc Schink <dev@zapb.de>
Tested-by: jenkins
Diffstat (limited to 'src/target/armv7a.c')
-rw-r--r-- | src/target/armv7a.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/target/armv7a.c b/src/target/armv7a.c index 5c9f308..5f7b008 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -570,8 +570,6 @@ int armv7a_arch_state(struct target *target) if (arm->core_mode == ARM_MODE_ABT) armv7a_show_fault_registers(target); - if (target->debug_reason == DBG_REASON_WATCHPOINT) - LOG_USER("Watchpoint triggered at PC " TARGET_ADDR_FMT, armv7a->dpm.wp_addr); return ERROR_OK; } |