]> git.sur5r.net Git - openocd/commitdiff
aarch64: fix crash on single-stepping
authorMatthias Welwarsky <matthias.welwarsky@sysgo.com>
Wed, 26 Jul 2017 09:23:19 +0000 (11:23 +0200)
committerPaul Fertser <fercerpav@gmail.com>
Tue, 9 Jan 2018 09:37:14 +0000 (09:37 +0000)
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 <matthias.welwarsky@sysgo.com>
Reviewed-on: http://openocd.zylin.com/4184
Tested-by: jenkins
Reviewed-by: Yao Qi <qiyaoltc@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/target/aarch64.c

index 8354d3ac0766cd6b892e840f5529e7ac7a309448..b18a12a4c6156329c664dd20f09cf89a8f328120 100644 (file)
@@ -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))) {