Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site axiom.UUCP
Path: utzoo!linus!axiom!smk
From: smk@axiom.UUCP (Steven M. Kramer)
Newsgroups: net.lang.c
Subject: ptrace & Re: Mark Williams csd
Message-ID: <14@axiom.UUCP>
Date: Thu, 27-Dec-84 13:44:22 EST
Article-I.D.: axiom.14
Posted: Thu Dec 27 13:44:22 1984
Date-Received: Sat, 29-Dec-84 05:07:20 EST
References: <344@rna.UUCP>
Organization: Axiom Technology, Newton MA
Lines: 23

I don't know of ANY UNIX debugger that handles tracing/history/single
stepping quickly.  This is because ptrace() is so slow!  For each
read/write/execution of the child it has to do a context switch.  When
you need to read the stack or rearrange breakpoints this can be very
slow, especially if the debugger doesn't optimize the places to single
step.

What we have done here, and I hope this can be adopted as a UNIX standard
is to ass a new form of ptrace request that takes an array of requests in
a buffer (pointed to by the addr parameter), the amt of which is stored in
data.  All the ptraces are done at once and the status code is returned for
each in the buffer.

Real benefits come in that there is only one context switch that need occur,
which is great if swapping is done.

Let's think of putting this in into UNIXs of the future.  It's prolonging the
ptrace rather than a more comprehensive construct (like an ioctl), but at
least it's compatible and it runs like a bat out of hell.
-- 
	--steve kramer
	{allegra,genrad,ihnp4,utzoo,philabs,uw-beaver}!linus!axiom!smk	(UUCP)
	linus!axiom!smk@mitre-bedford					(MIL)