Extra defines for sys/ptrace.h

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Extra defines for sys/ptrace.h

Andreas Jaeger


The following defines are in the public Linux kernel ABI but not in our
files.  Ok to commit?

Andreas

2007-06-16  Andreas Jaeger  <[hidden email]>

        [BZ #4125]
        * sysdeps/unix/sysv/linux/sys/ptrace.h
        (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK,
        PTRACE_O_TRACEVFORK, PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC,
        PTRACE_O_TRACEVFORKDONE, PTRACE_O_TRACEEXIT, PTRACE_O_MASK,
        PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK, PTRACE_EVENT_CLONE,
        PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE, PTRACE_EVENT_EXIT):
        Define.
        * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise.
        * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise.
        * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise.
        * sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise.

Index: sysdeps/unix/sysv/linux/sys/ptrace.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sys/ptrace.h,v
retrieving revision 1.15
diff -u -p -r1.15 ptrace.h
--- sysdeps/unix/sysv/linux/sys/ptrace.h 18 Sep 2006 13:46:13 -0000 1.15
+++ sysdeps/unix/sysv/linux/sys/ptrace.h 16 Jun 2007 17:23:46 -0000
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 1996-1999,2000,2006 Free Software Foundation, Inc.
+   Copyright (C) 1996-1999,2000,2006,2007 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
@@ -129,6 +129,29 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
+
+/* 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_MASK = 0x0000007f
+};
+
+/* 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
+};
+
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
Index: sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/ia64/sys/ptrace.h,v
retrieving revision 1.4
diff -u -p -r1.4 ptrace.h
--- sysdeps/unix/sysv/linux/ia64/sys/ptrace.h 18 Sep 2006 13:47:30 -0000 1.4
+++ sysdeps/unix/sysv/linux/ia64/sys/ptrace.h 16 Jun 2007 17:23:46 -0000
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux/ia64 version.
-   Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2007 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
@@ -127,6 +127,28 @@ struct pt_all_user_regs
     struct ia64_fpreg fr[128];
   };
 
+/* 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_MASK = 0x0000007f
+};
+
+/* 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
+};
+
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
Index: sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h,v
retrieving revision 1.3
diff -u -p -r1.3 ptrace.h
--- sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h 18 Sep 2006 13:46:59 -0000 1.3
+++ sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h 16 Jun 2007 17:23:46 -0000
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2006, 2007 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
@@ -99,6 +99,28 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
+/* 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_MASK = 0x0000007f
+};
+
+/* 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
+};
+
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
Index: sysdeps/unix/sysv/linux/s390/sys/ptrace.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/s390/sys/ptrace.h,v
retrieving revision 1.3
diff -u -p -r1.3 ptrace.h
--- sysdeps/unix/sysv/linux/s390/sys/ptrace.h 18 Sep 2006 13:46:59 -0000 1.3
+++ sysdeps/unix/sysv/linux/s390/sys/ptrace.h 16 Jun 2007 17:23:46 -0000
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux version.
-   Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc.
    Contributed by Denis Joseph Barrow ([hidden email]).
    This file is part of the GNU C Library.
 
@@ -138,6 +138,28 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
+/* 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_MASK = 0x0000007f
+};
+
+/* 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
+};
+
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be
Index: sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h,v
retrieving revision 1.6
diff -u -p -r1.6 ptrace.h
--- sysdeps/unix/sysv/linux/sparc/sys/ptrace.h 18 Sep 2006 13:46:59 -0000 1.6
+++ sysdeps/unix/sysv/linux/sparc/sys/ptrace.h 16 Jun 2007 17:23:46 -0000
@@ -1,5 +1,5 @@
 /* `ptrace' debugger support interface.  Linux/SPARC version.
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006
+   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2006, 2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -183,6 +183,28 @@ enum __ptrace_request
 #define PT_SETSIGINFO PTRACE_SETSIGINFO
 };
 
+/* 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_MASK = 0x0000007f
+};
+
+/* 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
+};
+
 /* Perform process tracing functions.  REQUEST is one of the values
    above, and determines the action to be taken.
    For all requests except PTRACE_TRACEME, PID specifies the process to be

--
 Andreas Jaeger, Director Platform/openSUSE, [hidden email]
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Extra defines for sys/ptrace.h

jbailey
On 16/06/07, Andreas Jaeger <[hidden email]> wrote:
>
>
> The following defines are in the public Linux kernel ABI but not in our
> files.  Ok to commit?

Now that the Linux kernel is providing useful headers that they
consider stable, is it better to take out the duplicate copies from
glibc and just use those?

--
Jeff Bailey - http://www.raspberryginger.com/jbailey/
Reply | Threaded
Open this post in threaded view
|

Re: Extra defines for sys/ptrace.h

Ulrich Drepper
In reply to this post by Andreas Jaeger
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Jaeger wrote:
> The following defines are in the public Linux kernel ABI but not in our
> files.  Ok to commit?

Yes.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGdWT32ijCOnn/RHQRAqupAJwONDEXpEkk6jb7k2x/gU92eFlsPwCgiQeK
yrZMXEaFxcJlLxao/2I7uUk=
=GbGO
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Extra defines for sys/ptrace.h

Andreas Jaeger
In reply to this post by jbailey
"Jeff Bailey" <[hidden email]> writes:

> On 16/06/07, Andreas Jaeger <[hidden email]> wrote:
>>
>>
>> The following defines are in the public Linux kernel ABI but not in our
>> files.  Ok to commit?
>
> Now that the Linux kernel is providing useful headers that they
> consider stable, is it better to take out the duplicate copies from
> glibc and just use those?

I don't think that they are in a state that we can copy them 1:1,

Andreas
--
 Andreas Jaeger, Director Platform/openSUSE, [hidden email]
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Extra defines for sys/ptrace.h

jbailey
On 17/06/07, Andreas Jaeger <[hidden email]> wrote:

> "Jeff Bailey" <[hidden email]> writes:
> > On 16/06/07, Andreas Jaeger <[hidden email]> wrote:
> >> The following defines are in the public Linux kernel ABI but not in our
> >> files.  Ok to commit?
> >
> > Now that the Linux kernel is providing useful headers that they
> > consider stable, is it better to take out the duplicate copies from
> > glibc and just use those?
>
> I don't think that they are in a state that we can copy them 1:1,

I was more thinking just relying on them being present on the system
rather than copying them.  Debian, Ubuntu, and Fedora (probably
others, I haven't checked) have the results of "make headers_install"
on the system which provides blessed headers from the kernel that have
been cleaned up for userspace consumption.  I don't think it makes
sense anymore to copy those bits into glibc anymore.

--
Jeff Bailey - http://www.raspberryginger.com/jbailey/