Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Oct 2001 00:08:10 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        <arch@FreeBSD.ORG>
Subject:   Re: Debugging interfaces
Message-ID:  <20011023235726.M63643-100000@delplex.bde.org>
In-Reply-To: <xzpu1wq340y.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23 Oct 2001, Dag-Erling Smorgrav wrote:

> We currently have three distinct debugging interfaces in the system:
> ktrace(2), ptrace(2) and procfs(5).  I think you'll all agree that
> that's two too many.  I propose to remove at least one of them.

Well, one too many.  It might be worth separating gdb-type debugging
from program-tracing type debugging.

> What I suggest is:
>
>  1) Leave ktrace alone.  It's a kernel option, so people who don't
>     like it can disable it.  Maybe remove it from GENERIC and change
>     the message ktrace(1) prints when run on a KTRACE-less kernel to
>     "re-compile kernel with 'options KTRACE' or use truss".
>
>  2) Extend ptrace so it can support truss.
>
>  3) Rewrite truss to use ptrace instead of procfs.
>
>  4) Dyke out the pioctl stuff from procfs.
>
> I have items 2) and 3) nearly done (to the point where 'truss -dS -o
> truss.out ls' produces the attached truss.out; you'll notice that it's
> not yet smart enough to display string arguments).  I've changed

Don't forget strace (in ports).  It's like truss but is much more
complete.  It seems to use mainly the pioctl interface :-).  Someone
once said that (Linux-only at the time) strace only needed a couple
of minor extensions to ptrace for it to be ported to FreeBSD.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011023235726.M63643-100000>