[lkml]   [2012]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 4/5] ptrace: renumber PTRACE_EVENT_STOP so that future new options and events can match
    PTRACE_EVENT_foo and PTRACE_O_TRACEfoo used to match.

    New PTRACE_EVENT_STOP is the first event which has no corresponding
    PTRACE_O_TRACE option. If we will ever want to add another such option,
    its PTRACE_EVENT's value will collide with PTRACE_EVENT_STOP's value.

    This patch changes PTRACE_EVENT_STOP value to prevent this.

    While at it, added a comment - the one atop PTRACE_EVENT block,
    saying "Wait extended result codes for the above trace options",
    is not true for PTRACE_EVENT_STOP.

    Signed-off-by: Denys Vlasenko <>
    include/linux/ptrace.h | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
    index 06be6a3..ec6571c 100644
    --- a/include/linux/ptrace.h
    +++ b/include/linux/ptrace.h
    @@ -61,7 +61,8 @@
    #define PTRACE_EVENT_EXEC 4
    #define PTRACE_EVENT_EXIT 6
    -#define PTRACE_EVENT_STOP 7
    +/* Extended result codes which enabled by means other than options. */
    +#define PTRACE_EVENT_STOP 128

    /* options set using PTRACE_SETOPTIONS */

     \ /
      Last update: 2012-02-10 15:47    [W:0.019 / U:19.572 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site