[Pdbg] [PATCH] libpdbg: Always fail sreset on p8

Alistair Popple alistair at popple.id.au
Fri Jun 15 13:59:22 AEST 2018


Thanks, not segfaulting is always a win. Looking at Skiboot it looks like Nick
may have figured out how to make it work so we should look into this some more
at some point. Failing that we can always emulate it using instruction ramming.

- Alistair

On Wednesday, 6 June 2018 5:02:13 PM AEST Rashmica Gupta wrote:
> Currently attempting to do a './pdbg -p x -c x -t x sreset'
> segfaults as there is no sreset function defined for p8. Apparently
> we can't easily sreset on p8, so add in function that always fails
> as this is better than segfaulting.
> ---
>  libpdbg/p8chip.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
> index 817ef2c..5e3ad97 100644
> --- a/libpdbg/p8chip.c
> +++ b/libpdbg/p8chip.c
> @@ -283,6 +283,12 @@ static int p8_thread_start(struct thread *thread)
>  	return 0;
>  }
>  
> +static int p8_thread_sreset(struct thread *thread)
> +{
> +	/* Broken on p8 */
> +	return 1;
> +}
> +
>  static int p8_ram_setup(struct thread *thread)
>  {
>  	struct pdbg_target *target;
> @@ -432,6 +438,7 @@ static struct thread p8_thread = {
>  	.step = p8_thread_step,
>  	.start = p8_thread_start,
>  	.stop = p8_thread_stop,
> +	.sreset = p8_thread_sreset,
>  	.ram_setup = p8_ram_setup,
>  	.ram_instruction = p8_ram_instruction,
>  	.ram_destroy = p8_ram_destroy,
> 




More information about the Pdbg mailing list