Subject: /usr/include/sys/ptrace.h missing PT_READ_U?
To: None <netbsd-help@NetBSD.ORG>
From: Brook Milligan <brook@trillium.NMSU.Edu>
List: netbsd-help
Date: 01/08/1996 22:36:35
I am trying to compile gdb v4.15.1 on a netbsd 1.1/i386 box.
Everything works fine except for a missing definition of PT_READ_U as
a parameter to ptrace(2).

The (abbreviated) ptrace(2) man page includes:

     ptrace - process tracing and debugging

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ptrace.h>

     PT_READ_U     This request reads an int from the traced process' user
                   structure.  The addr argument specifies the location of the
                   int relative to the base of the user structure; it will
                   usually be an integer value cast to caddr_t either explic-
                   itly or via the presence of a prototype for ptrace().  Un-
                   like PT_READ_I and PT_READ_D, addr must be aligned on an
                   int boundary.  The value read is returned as the return
                   value from ptrace().

However, /usr/include/sys/ptrace.h does not define PT_READ_U (in fact,
nothing in /usr/include/sys/*.h does).  I am confused, especially
given the fact that the gdb documentation mentions native support on
the i386.  What gives?

Any pointers welcome.  Thanks.

-- 
Brook G. Milligan                      Internet:  bmilliga@nmsu.edu
Department of Biology
New Mexico State University            Telephone:  (505) 646-7980
Las Cruces, New Mexico  88003  U.S.A.  FAX:        (505) 646-5665