Re: [patch 19/36] Hexagon: Add ptrace support

From: Arnd Bergmann
Date: Wed Aug 17 2011 - 16:40:55 EST


On Wednesday 17 August 2011 11:35:16 Richard Kuo wrote:
> + switch (request) {
> + case PTRACE_PEEKUSR: /* read register specified by addr. */
> + ret = ptrace_peekusr(child, addr, (void __user *) data);
> + break;
> + case PTRACE_POKETEXT: /* write the word at location addr. */
> + case PTRACE_POKEDATA:
> + ret = generic_ptrace_pokedata(child, addr, data);
> + break;
> + case PTRACE_POKEUSR: /* write register specified by addr. */
> + ret = ptrace_pokeusr(child, addr, data);
> + break;
> + case PTRACE_GETREGS:
> + ret = ptrace_getregs(child, (void __user *) data);
> + break;
> + case PTRACE_SETREGS:
> + ret = ptrace_setregs(child, (void __user *) data);
> + break;
> + default:

I believe the current way to do this is to use regsets for everything,
see arch/openrisc/kernel/ptrace.c

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/