Re: [PATCH] Use PT_IO ptrace request if available

Daniel Jacobowitz
2002-11-09T00:08:31Z

On Sat, Nov 09, 2002 at 12:58:02AM +0100, Mark Kettenis wrote:
> The attached patch makes use of the PT_IO ptrace request that's
> available in *BSD for data transfers to/from the inferior. It's a
> couple of weeks ago now that my patch that fixes the FreeBSD
> 5.0-CURRENT kernel went in, and I hope that OpenBSD and NetBSD don't
> have any problems. We'll probably find out soon :-). Note that if
> you run FreeBSD 5.0-CURRENT from before October 16 and after March 16,
> your machine will probably lock up when using GDB. However, since
> -CURRENT is a development version, I think it's acceptable to ask
> people to upgrade.
>
> It would be great if we could get Linux to support the same interface.

We've got read covered, from /proc/<pid>/mem; I'm going to implement
that when I get a chance.

I suppose I could implement PT_IO the way you did... I was planning on
a Sun-style PTRACE_READDATA (SPARC Linux already has this) but it's not
possible on i386 (syscall with five arguments). I'm not sure it's
worth it; it's generally reading that we do in bulk, not writing.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer