diff options
author | Andreas Färber <afaerber@suse.de> | 2018-07-08 19:52:06 +0200 |
---|---|---|
committer | Matthias Welwarsky <matthias@welwarsky.de> | 2018-07-13 09:19:09 +0100 |
commit | b82ee0799f6e30d3f03bd707c6e9729de92248d2 (patch) | |
tree | edc470bcc15e09c3dc5337afae815492e0622a1e /src/target/armv8.c | |
parent | 0aa8e8cfc3c28f4fcbba549db45be4e712f02c0a (diff) | |
download | riscv-openocd-b82ee0799f6e30d3f03bd707c6e9729de92248d2.zip riscv-openocd-b82ee0799f6e30d3f03bd707c6e9729de92248d2.tar.gz riscv-openocd-b82ee0799f6e30d3f03bd707c6e9729de92248d2.tar.bz2 |
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 <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/4593
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Diffstat (limited to 'src/target/armv8.c')
-rw-r--r-- | src/target/armv8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/armv8.c b/src/target/armv8.c index 83f5530..dfa2c67 100644 --- a/src/target/armv8.c +++ b/src/target/armv8.c @@ -1063,7 +1063,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; } |