This is an automated email from Gerrit.

Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/1363

-- gerrit

commit 5e0749d3e09e14e224ee924dd84ca254c8497468
Author: Spencer Oliver <[email protected]>
Date:   Thu Apr 25 17:13:41 2013 +0100

    cortex_m: remove old target breakpoints/watchpoints
    
    Sometimes the target may have breakpoint registers set from a previous
    debug session, we can either sync them or as we have chosen here clear them.
    
    Change-Id: I439a623ebbf010246a70e5596d04aa7d546da731
    Signed-off-by: Spencer Oliver <[email protected]>

diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c
index c436bad..7094b07 100644
--- a/src/target/cortex_m.c
+++ b/src/target/cortex_m.c
@@ -1796,6 +1796,9 @@ fail1:
                for (j = 0; j < 3; j++, reg++)
                        cortex_m3_dwt_addreg(target, cache->reg_list + reg,
                                dwt_comp + 3 * i + j);
+
+               /* make sure we clear any watchpoints enabled on the target */
+               target_write_u32(target, comparator->dwt_comparator_address + 
8, 0);
        }
 
        *register_get_last_cache_p(&target->reg_cache) = cache;
@@ -1887,6 +1890,9 @@ int cortex_m3_examine(struct target *target)
                        cortex_m3->fp_comparator_list[i].type =
                                (i < cortex_m3->fp_num_code) ? FPCR_CODE : 
FPCR_LITERAL;
                        cortex_m3->fp_comparator_list[i].fpcr_address = 
FP_COMP0 + 4 * i;
+
+                       /* make sure we clear any breakpoints enabled on the 
target */
+                       target_write_u32(target, 
cortex_m3->fp_comparator_list[i].fpcr_address, 0);
                }
                LOG_DEBUG("FPB fpcr 0x%" PRIx32 ", numcode %i, numlit %i",
                        fpcr,

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to