mirror of
https://github.com/openocd-org/openocd.git
synced 2025-10-14 02:58:23 +08:00
rtos/hwthread: Hide unavailable targets from thread list.
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>
This commit is contained in:

committed by
Antonio Borneo

parent
92287c1a2a
commit
98ed83e278
@@ -105,7 +105,8 @@ static int hwthread_update_threads(struct rtos *rtos)
|
||||
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;
|
||||
@@ -130,7 +131,8 @@ static int hwthread_update_threads(struct rtos *rtos)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user