This is an automated email from Gerrit.

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

-- gerrit

commit f5bb6ed1ff84d9de45bfd31b5f631e46c291cb98
Author: Antonio Borneo <[email protected]>
Date:   Tue Feb 27 23:59:44 2018 +0100

    target/cortex_a: fix test for target halted
    
    Only the bit DSCR_CORE_HALTED has to be checked to determine
    if the target is halted.
    Fix the test and also remove the macro DSCR_RUN_MODE() that
    is now unused.
    
    Reported by Tomas Vanek <[email protected]> inside
    http://openocd.zylin.com/#/c/2884/4
    
    Change-Id: Iefc86e6adbc1ef3ccf46ecc3e1c6aed6c50897eb
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/target/arm_dpm.h b/src/target/arm_dpm.h
index d05c66c..11fee69 100644
--- a/src/target/arm_dpm.h
+++ b/src/target/arm_dpm.h
@@ -189,8 +189,6 @@ void arm_dpm_report_wfar(struct arm_dpm *, uint32_t wfar);
 #define DSCR_DTR_RX_FULL            (0x1 << 30) /* bit 31 is reserved */
 
 #define DSCR_ENTRY(dscr)            ((dscr) & 0x3f)
-#define DSCR_RUN_MODE(dscr)         ((dscr) & 0x03)
-
 
 /* Methods of entry into debug mode */
 #define DSCR_ENTRY_HALT_REQ           (0x03)
diff --git a/src/target/cortex_a.c b/src/target/cortex_a.c
index 0a55a20..9156908 100644
--- a/src/target/cortex_a.c
+++ b/src/target/cortex_a.c
@@ -720,7 +720,7 @@ static int cortex_a_poll(struct target *target)
                return retval;
        cortex_a->cpudbg_dscr = dscr;
 
-       if (DSCR_RUN_MODE(dscr) == (DSCR_CORE_HALTED | DSCR_CORE_RESTARTED)) {
+       if (dscr & DSCR_CORE_HALTED) {
                if (prev_target_state != TARGET_HALTED) {
                        /* We have a halting debug event */
                        LOG_DEBUG("Target halted");

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to