From owner-freebsd-current Tue Jun 18 15:55:36 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA06442 for current-outgoing; Tue, 18 Jun 1996 15:55:36 -0700 (PDT) Received: from jraynard.demon.co.uk (jraynard.demon.co.uk [158.152.42.77]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA06421 for ; Tue, 18 Jun 1996 15:55:09 -0700 (PDT) Received: (from fcurrent@localhost) by jraynard.demon.co.uk (8.7.5/8.6.12) id QAA01838; Tue, 18 Jun 1996 16:30:23 GMT Date: Tue, 18 Jun 1996 16:30:23 GMT Message-Id: <199606181630.QAA01838@jraynard.demon.co.uk> From: James Raynard To: freebsd-current@freebsd.org Subject: strace [Was Re: ktrace...] Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Sorry, I seem to have lost the original mail but someone was asking about porting strace to FreeBSD. I pulled down the source for strace-3.1 from the Incoming directory of my local Sunsite mirror this afternoon and had a look at it. Here's an extract from the PORTING file that comes with it:- The number one question is ``Does the native operating support a concept which enables even the mere possibility of tracing?''. So far I have seen two mechanisms which support system call tracing. They are the SunOS originated feature of the PTRACE_SYSCALL argument to the ptrace system call and the PIOCSENTRY/PIOCSEXIT ioctl for the /proc filesystem under System V release 4 style Unix derived systems. There may be others (surely a better one could be devised :-) but innovation is a rare commodity so unless one of these is supported you may be SOL. Now, FreeBSD has both ptrace() and a /proc filesystem, but neither of them support system call tracing as far as I can tell (and I checked through the source just in case there was anything undocumented). OTH ktrace() does support system call tracing, but does it all inside the kernel, which is no use to a program in userland. We're SOL 8-) -- James Raynard, Edinburgh, Scotland james@jraynard.demon.co.uk