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

Alistair Popple alistair at popple.id.au
Fri Aug 2 13:56:07 AEST 2019


Reviewed-by: Alistair Popple <alistair at popple.id.au>

On Friday, 2 August 2019 12:25:35 PM AEST Amitay Isaacs wrote:
> 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);
>  	}
>  
> 






More information about the Pdbg mailing list