[Pdbg] [PATCH] libpdbg: Fix implementation of thread_sreset_all

Amitay Isaacs amitay at ozlabs.org
Fri Aug 2 12:25:35 AEST 2019


Run sreset procedure only on enabled threads.

Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 libpdbg/chip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 67e3afa..a36a038 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -178,6 +178,9 @@ int thread_sreset_all(void)
 		return rc;
 
 	pdbg_for_each_class_target("thread", thread) {
+		if (pdbg_target_status(thread) != PDBG_TARGET_ENABLED)
+			continue;
+
 		rc |= thread_sreset(thread);
 	}
 
-- 
2.21.0



More information about the Pdbg mailing list