Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9af62547 authored by Simon Marchi's avatar Simon Marchi Committed by Chris Metcalf
Browse files

arch/tile: implement arch_ptrace using user_regset on tile



This patch changes arch_ptrace on tile so that it uses user_regset
to implement the PTRACE_GETREGS and PTRACE_SETREGS operations.

Signed-off-by: default avatarSimon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
parent 7be68284
Loading
Loading
Loading
Loading
+6 −9
Original line number Original line Diff line number Diff line
@@ -193,18 +193,15 @@ long arch_ptrace(struct task_struct *child, long request,
		break;
		break;


	case PTRACE_GETREGS:  /* Get all registers from the child. */
	case PTRACE_GETREGS:  /* Get all registers from the child. */
		if (copy_to_user(datap, getregs(child, &copyregs),
		ret = copy_regset_to_user(child, &tile_user_regset_view,
				 sizeof(struct pt_regs)) == 0) {
					  REGSET_GPR, 0,
			ret = 0;
					  sizeof(struct pt_regs), datap);
		}
		break;
		break;


	case PTRACE_SETREGS:  /* Set all registers in the child. */
	case PTRACE_SETREGS:  /* Set all registers in the child. */
		if (copy_from_user(&copyregs, datap,
		ret = copy_regset_from_user(child, &tile_user_regset_view,
				   sizeof(struct pt_regs)) == 0) {
					    REGSET_GPR, 0,
			putregs(child, &copyregs);
					    sizeof(struct pt_regs), datap);
			ret = 0;
		}
		break;
		break;


	case PTRACE_GETFPREGS:  /* Get the child FPU state. */
	case PTRACE_GETFPREGS:  /* Get the child FPU state. */