summaryrefslogtreecommitdiff
path: root/src/target/arm_dpm.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-02 11:31:32 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-02 11:31:32 -0800
commit55eeea7fceb67f29c9a43eeb7993c70214157343 (patch)
tree9f6adc4a1d5235ce5b3b9aa9d391ee25f685b971 /src/target/arm_dpm.c
parent03c103d56a3937069a4a6abd02cffabe2f3a6641 (diff)
downloadopenocd+libswd-55eeea7fceb67f29c9a43eeb7993c70214157343.tar.gz
openocd+libswd-55eeea7fceb67f29c9a43eeb7993c70214157343.tar.bz2
openocd+libswd-55eeea7fceb67f29c9a43eeb7993c70214157343.tar.xz
openocd+libswd-55eeea7fceb67f29c9a43eeb7993c70214157343.zip
ARMv7a/Cortex-A8: report watchpoint trigger insn
Save and display the address of the instruction which triggered the watchpoint. Because of pipelining, that's well behind the PC value when debug entry completes. (Example in a subroutine that had been returned from...) Remove unused A8 stuff, mostly watchpoint hooks from the header. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/arm_dpm.c')
-rw-r--r--src/target/arm_dpm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/target/arm_dpm.c b/src/target/arm_dpm.c
index f94fcc4e..7c09e064 100644
--- a/src/target/arm_dpm.c
+++ b/src/target/arm_dpm.c
@@ -736,6 +736,23 @@ static int dpm_remove_watchpoint(struct target *target, struct watchpoint *wp)
return retval;
}
+void arm_dpm_report_wfar(struct arm_dpm *dpm, uint32_t addr)
+{
+ switch (dpm->arm->core_state) {
+ case ARMV4_5_STATE_ARM:
+ addr -= 8;
+ break;
+ case ARMV4_5_STATE_THUMB:
+ case ARM_STATE_THUMB_EE:
+ addr -= 4;
+ break;
+ case ARMV4_5_STATE_JAZELLE:
+ /* ?? */
+ break;
+ }
+ dpm->wp_pc = addr;
+}
+
/*----------------------------------------------------------------------*/
/*