This is an automated email from Gerrit.

Matthias Welwarsky (matth...@welwarsky.de) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/3825

-- gerrit

commit f24c69326ec70f09b0c9a43707bbf5a2cf33f6be
Author: Matthias Welwarsky <matthias.welwar...@sysgo.com>
Date:   Thu Oct 20 16:48:42 2016 +0200

    aarch64: enlarge value buffer of arm_reg to store 64 bit
    
    struct arm_reg::value[] must be 8 byte to hold a 64bit register value.
    
    Change-Id: If253e90731d0ee855eafd9d7b63b91f84630cc7c
    Signed-off-by: Matthias Welwarsky <matthias.welwar...@sysgo.com>

diff --git a/src/target/arm.h b/src/target/arm.h
index 6cbc409..32f7b16 100644
--- a/src/target/arm.h
+++ b/src/target/arm.h
@@ -223,7 +223,7 @@ struct arm_reg {
        enum arm_mode mode;
        struct target *target;
        struct arm *arm;
-       uint8_t value[4];
+       uint8_t value[8];
 };
 
 struct reg_cache *arm_build_reg_cache(struct target *target, struct arm *arm);
diff --git a/src/target/armv8.c b/src/target/armv8.c
index ba14140..ced6337 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -1171,7 +1171,7 @@ struct reg_cache *armv8_build_reg_cache(struct target 
*target)
 
                reg_list[i].name = armv8_regs[i].name;
                reg_list[i].size = armv8_regs[i].bits;
-               reg_list[i].value = calloc(1, 8);
+               reg_list[i].value = &arch_info[i].value[0];
                reg_list[i].type = &armv8_reg_type;
                reg_list[i].arch_info = &arch_info[i];
 

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to