From: Matthias Welwarsky Date: Wed, 26 Jul 2017 09:23:19 +0000 (+0200) Subject: aarch64: fix crash on single-stepping X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3cba4bd4cb8a8d9e8e27e3f83c647b4ff5123c22;p=openocd aarch64: fix crash on single-stepping Make sure to skip un-examined targets (e.g. targets with deferred examination) on single-stepping fixes bug #158 Change-Id: Ib40c6fee03079fd078bd52a84615e6f8a081d128 Signed-off-by: Matthias Welwarsky Reviewed-on: http://openocd.zylin.com/4184 Tested-by: jenkins Reviewed-by: Yao Qi Reviewed-by: Paul Fertser --- diff --git a/src/target/aarch64.c b/src/target/aarch64.c index 8354d3ac..b18a12a4 100644 --- a/src/target/aarch64.c +++ b/src/target/aarch64.c @@ -770,6 +770,9 @@ static int aarch64_step_restart_smp(struct target *target) if (curr == target) continue; + if (!target_was_examined(curr)) + continue; + retval = aarch64_check_state_one(curr, PRSR_SDR, PRSR_SDR, &resumed, &prsr); if (retval != ERROR_OK || (!resumed && (prsr & PRSR_HALT))) {