[Pdbg] [PATCH v3 06/13] thread.c: threadstatus improve output and implement P9 stop
Alistair Popple
alistair at popple.id.au
Tue May 8 11:06:04 AEST 2018
Thanks Nick!
> +
> + for_each_child_target("core", pib_target, get_core_max_threads, &maxindex, NULL);
For background these crazy callback loops are mostly a hangover from before I'd
turned things into a "proper" library at which point we added iterators like
pdbg_for_each_target() which are called like a normal loop. Eg:
pdbg_for_each_target("core", pib_target, target) {
// do stuff with target
}
However it's no worse than what we currently have and there's plenty of other
callers of these functions to fix up so I'm ok with adding one or two more.
> + printf("\np%01dt:", index);
> + for (i = 0; i <= maxindex; i++)
> + printf(" %d", i);
> + printf("\n");
> +
> + return for_each_child_target("core", pib_target, print_core_thread_status, &maxindex, NULL);
> };
>
> static int start_thread(struct pdbg_target *thread_target, uint32_t index, uint64_t *unused, uint64_t *unused1)
>
More information about the Pdbg
mailing list