From 75c706cc043183d98592dbe3c6f170d627849d0f Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 11 Dec 2009 15:26:10 -0800 Subject: ARM DPM: support updating HW breakpoints Abstract the DPM breakpoint and watchpoint data structures to have a shared core for housekeeping. Abstract the code updating the watchpoint registers so that it can be used to update breakpoint registers. Then do so, when something has set up the breakpoint state used by this code. Signed-off-by: David Brownell --- src/target/arm_dpm.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/target/arm_dpm.h') diff --git a/src/target/arm_dpm.h b/src/target/arm_dpm.h index 135e3db8..5d75ed41 100644 --- a/src/target/arm_dpm.h +++ b/src/target/arm_dpm.h @@ -31,24 +31,22 @@ * registers are compatible. */ -struct dpm_bp { - struct breakpoint *bp; - /* bp->address == breakpoint value register - * control == breakpoint control register - */ +struct dpm_bpwp { + unsigned number; + uint32_t address; uint32_t control; /* true if hardware state needs flushing */ bool dirty; }; +struct dpm_bp { + struct breakpoint *bp; + struct dpm_bpwp bpwp; +}; + struct dpm_wp { struct watchpoint *wp; - /* wp->address == watchpoint value register - * control == watchpoint control register - */ - uint32_t control; - /* true if hardware state needs flushing */ - bool dirty; + struct dpm_bpwp bpwp; }; /** -- cgit v1.2.3