This is an automated email from Gerrit.

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

-- gerrit

commit 291dd1e1d070da08d2c22c7e2b0abdb391bab20c
Author: Tarek BOCHKATI <[email protected]>
Date:   Sun Feb 14 13:21:36 2021 +0100

    armv_dpm: do not read/write non-existent registers
    
    Change-Id: I6a991899bb178ee0c6b41870a45d0a9439d9dc1e
    Signed-off-by: Tarek BOCHKATI <[email protected]>

diff --git a/src/target/arm_dpm.c b/src/target/arm_dpm.c
index 6bfe355..26fa218 100644
--- a/src/target/arm_dpm.c
+++ b/src/target/arm_dpm.c
@@ -514,7 +514,7 @@ int arm_dpm_write_dirty_registers(struct arm_dpm *dpm, bool 
bpwp)
                                continue;
                        if (arm->cpsr == cache->reg_list + i)
                                continue;
-                       if (!cache->reg_list[i].dirty)
+                       if (!cache->reg_list[i].exist || 
!cache->reg_list[i].dirty)
                                continue;
 
                        r = cache->reg_list[i].arch_info;
@@ -763,7 +763,7 @@ static int arm_dpm_full_context(struct target *target)
                for (unsigned i = 0; i < cache->num_regs; i++) {
                        struct arm_reg *r;
 
-                       if (cache->reg_list[i].valid)
+                       if (!cache->reg_list[i].exist || 
cache->reg_list[i].valid)
                                continue;
                        r = cache->reg_list[i].arch_info;
 

-- 


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

Reply via email to