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>bscan_tunnel
parent
0aa8e8cfc3
commit
b82ee0799f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue