From patchwork Sun Sep 7 15:01:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 386704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 20E8814012A for ; Mon, 8 Sep 2014 01:02:04 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DBAED94C4E; Sun, 7 Sep 2014 15:02:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28-8QGjC9WlY; Sun, 7 Sep 2014 15:02:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A3DEC94C03; Sun, 7 Sep 2014 15:02:01 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id E0BC61C22F5 for ; Sun, 7 Sep 2014 15:01:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DE6ED3293C for ; Sun, 7 Sep 2014 15:01:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wkK2YfBtnyT2 for ; Sun, 7 Sep 2014 15:01:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from loknar.toptech.com.ar (loknar.toptech.com.ar [78.46.79.162]) by silver.osuosl.org (Postfix) with ESMTPS id ABEC0303C3 for ; Sun, 7 Sep 2014 15:01:57 +0000 (UTC) Received: from asgard (cpe-186-18-128-65.telecentro-reversos.com.ar [186.18.128.65] (may be forged)) (authenticated bits=0) by loknar.toptech.com.ar (8.14.9/8.14.9) with ESMTP id s87F1pAj007063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 7 Sep 2014 15:01:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1410102115; bh=yfuJT4SSuIjX+zJ3yujr+mX2xgecgb6eMScIJFccTKs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=no3np3GUcf2T0h6BavIL+cHuj5ReFIjIxm2ZaqzoOaPtoee+LFZaui+NV0hgetniC I8OisBOYDkbqfwoIiXIhgB1sFjjMbfSbcQyOx61m5czAYXMIqsXuqsLgieABN0lSp3 YR/TdZESpSwEZL9CmHOy6xZ685d8puhttaoekg5Y= Received: by asgard (sSMTP sendmail emulation); Sun, 07 Sep 2014 12:01:45 -0300 From: Gustavo Zacarias To: uclibc@uclibc.org Subject: [PATCH 2/2] sparc: update ptrace.h to latest from glibc Date: Sun, 7 Sep 2014 12:01:34 -0300 Message-Id: <1410102094-2035-2-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1410102094-2035-1-git-send-email-gustavo@zacarias.com.ar> References: <1410102094-2035-1-git-send-email-gustavo@zacarias.com.ar> X-Virus-Scanned: clamav-milter 0.98.1 at loknar X-Virus-Status: Clean X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: uclibc-bounces@uclibc.org Update sys/ptrace.h to latest glibc release for a lot of missing definitions. Signed-off-by: Gustavo Zacarias --- libc/sysdeps/linux/sparc/sys/ptrace.h | 97 +++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 5 deletions(-) diff --git a/libc/sysdeps/linux/sparc/sys/ptrace.h b/libc/sysdeps/linux/sparc/sys/ptrace.h index 26fa4b3..0f6c2cc 100644 --- a/libc/sysdeps/linux/sparc/sys/ptrace.h +++ b/libc/sysdeps/linux/sparc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux/SPARC version. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ #define _SYS_PTRACE_H 1 #include - +#include #include /* Linux/SPARC kernels up to 2.3.18 do not care much @@ -147,12 +147,11 @@ enum __ptrace_request #endif /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24 + PTRACE_SYSCALL = 24, #define PTRACE_SYSCALL PTRACE_SYSCALL #if __WORDSIZE == 64 - , /* Get all floating point registers used by a processes. This is not supported on all machines. */ PTRACE_GETFPREGS = 25, @@ -160,10 +159,98 @@ enum __ptrace_request /* Set all floating point registers used by a processes. This is not supported on all machines. */ - PTRACE_SETFPREGS = 26 + PTRACE_SETFPREGS = 26, #define PT_SETFPREGS PTRACE_SETFPREGS #endif + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + PTRACE_PEEKSIGINFO = 0x4209 +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO +}; + + +/* Flag for PTRACE_LISTEN. */ +enum __ptrace_flags +{ + PTRACE_SEIZE_DEVEL = 0x80000000 +}; + +/* Options set using PTRACE_SETOPTIONS. */ +enum __ptrace_setoptions +{ + PTRACE_O_TRACESYSGOOD = 0x00000001, + PTRACE_O_TRACEFORK = 0x00000002, + PTRACE_O_TRACEVFORK = 0x00000004, + PTRACE_O_TRACECLONE = 0x00000008, + PTRACE_O_TRACEEXEC = 0x00000010, + PTRACE_O_TRACEVFORKDONE = 0x00000020, + PTRACE_O_TRACEEXIT = 0x00000040, + PTRACE_O_TRACESECCOMP = 0x00000080, + PTRACE_O_EXITKILL = 0x00100000, + PTRACE_O_MASK = 0x001000ff +}; + +/* Wait extended result codes for the above trace options. */ +enum __ptrace_eventcodes +{ + PTRACE_EVENT_FORK = 1, + PTRACE_EVENT_VFORK = 2, + PTRACE_EVENT_CLONE = 3, + PTRACE_EVENT_EXEC = 4, + PTRACE_EVENT_VFORK_DONE = 5, + PTRACE_EVENT_EXIT = 6, + PTRACE_EVENT_SECCOMP = 7 +}; + +/* Arguments for PTRACE_PEEKSIGINFO. */ +struct __ptrace_peeksiginfo_args +{ + __uint64_t off; /* From which siginfo to start. */ + __uint32_t flags; /* Flags for peeksiginfo. */ + __int32_t nr; /* How many siginfos to take. */ +}; + +enum __ptrace_peeksiginfo_flags +{ + /* Read signals from a shared (process wide) queue. */ + PTRACE_PEEKSIGINFO_SHARED = (1 << 0) }; /* Perform process tracing functions. REQUEST is one of the values