From 3cba4bd4cb8a8d9e8e27e3f83c647b4ff5123c22 Mon Sep 17 00:00:00 2001 From: Matthias Welwarsky Date: Wed, 26 Jul 2017 11:23:19 +0200 Subject: [PATCH] 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 --- src/target/aarch64.c | 3 +++ 1 file changed, 3 insertions(+) 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))) { -- 2.39.5