[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a276dfzFE8kxYFx_RgJWx31px6M24tf+h7eRowma69Fhg@mail.gmail.com>
Date: Mon, 26 Mar 2018 15:06:21 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Guo Ren <ren_guo@...ky.com>
Cc: linux-arch <linux-arch@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Jason Cooper <jason@...edaemon.net>,
c-sky_gcc_upstream@...ky.com, gnu-csky@...tor.com,
thomas.petazzoni@...tlin.com, wbx@...ibc-ng.org
Subject: Re: [PATCH 12/19] csky: Debug and Ptrace GDB
On Sun, Mar 18, 2018 at 8:51 PM, Guo Ren <ren_guo@...ky.com> wrote:
> Signed-off-by: Guo Ren <ren_guo@...ky.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
Powered by blists - more mailing lists