This is an automated email from Gerrit.

Andreas Färber ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4593

-- gerrit

commit d592d48e3d2250e002bf3066f96d772e27947f59
Author: Andreas Färber <[email protected]>
Date:   Sun Jul 8 19:52:06 2018 +0200

    target: armv8: Avoid semihosting segfault on halt
    
    Avoid a NULL pointer dereference when halting an aarch64 core.
    
    Change-Id: I333d40475ab26e2f0dca5c27302a5fa4d817a12f
    Signed-off-by: Andreas Färber <[email protected]>

diff --git a/src/target/armv8.c b/src/target/armv8.c
index 20f2b67..d1212a6 100644
--- a/src/target/armv8.c
+++ b/src/target/armv8.c
@@ -1050,7 +1050,7 @@ int armv8_aarch64_state(struct target *target)
                armv8_mode_name(arm->core_mode),
                buf_get_u32(arm->cpsr->value, 0, 32),
                buf_get_u64(arm->pc->value, 0, 64),
-               target->semihosting->is_active ? ", semihosting" : "");
+               (target->semihosting && target->semihosting->is_active) ? ", 
semihosting" : "");
 
        return ERROR_OK;
 }

-- 

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to