glibc and ptrace

Richard Hirst rhirst@linuxcare.com
Thu, 21 Dec 2000 13:19:24 +0000


On Tue, Dec 19, 2000 at 06:22:57PM +0000, Richard Hirst wrote:
> I have a problem with ptrace.  The ptrace syscall for PTRACE_PEEK*
> saves the result in *data (4th arg), whereas the man page says
> it returns the result as the return value, and the 4th arg is
> ignored.  userland things, like strace for example, expect the
> man page behaviour.  I assumed glibc should be providing a wrapper
> to translate from kernel to userland syntax, but our glibc doesn't
> appear to do so.

Turned out I had to fix glibc to use the wrapper on parisc.  This
means our strace source will be broken for new glibc builds.  I'll
fix strace once the glibc change propagates through.  If anyone
wants to fix their own strace for testing, just remove the raw_ptrace
stuff from strace/defs.h

Richard