[Pdbg] [PATCH 7/9] libpdbg: Rearrange thread procedures for register access
Alistair Popple
alistair at popple.id.au
Mon Jun 22 18:16:29 AEST 2020
On Monday, 22 June 2020 10:44:59 AM AEST Amitay Isaacs wrote:
> +int thread_getregs(struct pdbg_target *target, struct thread_regs *regs)
> +{
> + struct thread *thread;
> +
> + assert(pdbg_target_is_class(target, "thread"));
> + thread = target_to_thread(target);
> +
> + if (thread->getregs)
> + return thread->getregs(thread, regs);
> +
> + PR_ERROR("Not implemented on the backend\n");
> + return -1;
> +}
I was almost going to say that this isn't a thread specific operation and
should be kept as a generic library function that just goes and calls
getreg(blah) one by one. But it seems the SBEFIFO has a method to get a heap
of registers at once, and it would be possible to develop more efficient
implementations of this for instruction ramming too so guess it makes sense to
have this as a thread specific call back like the rest.
- Alistair
More information about the Pdbg
mailing list