Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jun 1996 16:30:23 GMT
From:      James Raynard <fcurrent@jraynard.demon.co.uk>
To:        freebsd-current@freebsd.org
Subject:   strace [Was Re: ktrace...]
Message-ID:  <199606181630.QAA01838@jraynard.demon.co.uk>

next in thread | raw e-mail | index | archive | help
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



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