lkml.org 
[lkml]   [2018]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 12/19] csky: Debug and Ptrace GDB
On Sun, Mar 18, 2018 at 8:51 PM, Guo Ren <ren_guo@c-sky.com> wrote:
> Signed-off-by: Guo Ren <ren_guo@c-sky.com>

> + */
> +long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
> + unsigned long data)
> +{
> + unsigned long tmp = 0, ret = 0;
> + int i;
> +
> + switch (request) {
> + /* read the word at location addr in the USER area. */
> + case PTRACE_PEEKUSR:

> +
> + case PTRACE_POKEUSR: /* write the word at location addr in the USER area */

> + case PTRACE_GETREGS: /* Get all gp regs from the child. */

> + case PTRACE_SETREGS: /* Set all gp regs in the child. */
> + for (i = 0; i <= CSKY_GREG_NUM; i++) {
> + ret = get_user(tmp, (unsigned long *)data);


I think all of these should use the regset code like arch/riscv/kernel/ptrace.c
does.

Arnd

\
 
 \ /
  Last update: 2018-03-26 15:07    [W:0.339 / U:1.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site