Imported from
https://github.com/riscv-collab/riscv-openocd/pull/767
Change-Id: I53c6e2876d9bab70800a0f080e72a2abe0499120
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8919
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
foreach_smp_target(head, target->smp_targets) {
struct target *curr = head->target;
- if (!target_was_examined(curr))
+ if (!target_was_examined(curr) ||
+ curr->state == TARGET_UNAVAILABLE)
continue;
++thread_list_size;
foreach_smp_target(head, target->smp_targets) {
struct target *curr = head->target;
- if (!target_was_examined(curr))
+ if (!target_was_examined(curr) ||
+ curr->state == TARGET_UNAVAILABLE)
continue;
threadid_t tid = threadid_from_target(curr);