Re: [PATCH v3 26/29] nios2: ptrace support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2014-09-08 at 11:22:37 +0200, Ley Foon Tan <lftan@xxxxxxxxxx> wrote:
> Add ptrace support for nios2.
> 
> Signed-off-by: Ley Foon Tan <lftan@xxxxxxxxxx>
> ---
>  arch/nios2/include/asm/ptrace.h      |  33 +++++++
>  arch/nios2/include/uapi/asm/ptrace.h | 120 ++++++++++++++++++++++++
>  arch/nios2/kernel/ptrace.c           | 176 +++++++++++++++++++++++++++++++++++
>  3 files changed, 329 insertions(+)
>  create mode 100644 arch/nios2/include/asm/ptrace.h
>  create mode 100644 arch/nios2/include/uapi/asm/ptrace.h
>  create mode 100644 arch/nios2/kernel/ptrace.c
[...]
> diff --git a/arch/nios2/kernel/ptrace.c b/arch/nios2/kernel/ptrace.c
> new file mode 100644
> index 0000000..bcbf748
> --- /dev/null
> +++ b/arch/nios2/kernel/ptrace.c
[...]
> +long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
> +		 unsigned long data)
> +{
> +	int ret = -EIO;
> +
> +	pr_debug("REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n", request, addr, data);
> +
> +	switch (request) {
> +	default:
> +		ret = ptrace_request(child, request, addr, data);
> +		break;
> +	}
> +
> +	return ret;
> +}

This could be simplified to:

long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
		 unsigned long data)
{
	return ptrace_request(child, request, addr, data);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux